web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter Gallery using t...
Power Apps
Unanswered

Filter Gallery using two combo boxex connected to two multiselect choice columns

(0) ShareShare
ReportReport
Posted on by 94

Hi,

 

I'm trying to filter my gallery using two combo boxes each linked to a choice multi select SharePoint column.

I'm using the follwing code, it allow me to filter to some extend but i'm not able to display any record that is under two choices. or more

looking forward for your support

 

With(
{
kData: Filter(
Sort(
PortfolioProjectList,
Modified,
SortOrder.Descending
),
VarUserEmail in BO.Email || VarUserEmail in BusinessPartner.Email || VarUserEmail = BUPortfolioOwner.Email || VarUserEmail = ProjectApplicant.Email
)
},
Sort(
AddColumns(
Filter(
kData,
(Len(Performance.Selected.Value) = 0 || IsEmpty(Performance.SelectedItems) || Concat(
'BusinessUnit(s)'.Value,
ThisRecord.Value,
", "
) in Performance.SelectedItems.Value) && (Len(HRSub.Selected.Value) = 0 || IsEmpty(HRSub.SelectedItems) || Concat(
'HRSubFunction(s)'.Value,
ThisRecord.Value,
", "
) in HRSub.SelectedItems.Value)
),
"StatSort",
Switch(
Status.Value,
"Approved",
1,
"Applied",
2,
"Draft",
3
)
),
StatSort
)
)

Categories:
I have the same question (0)
  • bnastase Profile Picture
    17 on at

    Okay a few things: your filtering logic is reliant on the Concat function to generate a string from multi-choice column values and then check if this concatenated string is in the selected items of your combo box. This method can be problematic if there are multiple selections because it expects the concatenated string to match the selection exactly.

     

    Try this: With(

    {

    kData: Filter(

    Sort(

    PortfolioProjectList,

    Modified,

    SortOrder.Descending

    ),

    VarUserEmail in BO.Email || VarUserEmail in BusinessPartner.Email || VarUserEmail = BUPortfolioOwner.Email || VarUserEmail = ProjectApplicant.Email

    )

    },

    Sort(

    AddColumns(

    Filter(

    kData,

    (Len(Performance.Selected.Value) = 0 || IsEmpty(Performance.SelectedItems) || CountRows(Intersect(Performance.SelectedItems, 'BusinessUnit(s)'.Value)) > 0) && 

    (Len(HRSub.Selected.Value) = 0 || IsEmpty(HRSub.SelectedItems) || CountRows(Intersect(HRSub.SelectedItems, 'HRSubFunction(s)'.Value)) > 0)

    ),

    "StatSort",

    Switch(

    Status.Value,

    "Approved",

    1,

    "Applied",

    2,

    "Draft",

    3

    )

    ),

    StatSort

    )

    )

     

    This should help improve your filtering for records that have multiple choices.

  • zerocool55 Profile Picture
    94 on at

    hi @bnastase 

    I can't try your code as we can't use intersect in powerapps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard