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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard