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 a gallery with ...
Power Apps
Answered

Filter a gallery with 2 comboboxes with multiple selections enabled

(0) ShareShare
ReportReport
Posted on by 11

Hi all,

I'd be really grateful if you help me with an issue I have.

I'm trying to filter a gallery based on two comboboxes. Both of the comboboxes get their data from a SP list Choices columns with "Allow multiple selections" option enabled.

I tried so many formulas found here but I always get different error messages (Invalid argument type - Tables/Text cannot be used in this context; Expecting a text value instead, etc).

I got to a point where I have a code without errors for just one of the comboboxes but it doesn't actually filter anything in the gallery.

My 2 comboboxes are BoxProcess (the respective SP column is BusinessProcess and BoxRole (SP column is BusinessRole). Here's the one formula I got to without errors but without any results shown.

 

Filter(
'DataSource',
If(
IsEmpty(BoxProcess.SelectedItems),
true,
IsBlank(BoxProcess.SelectedItems),
true,
CountRows(
Filter(
'DataSource',
CountRows(
Filter(
BoxProcess.SelectedItems.Value,
Value in BusinessProcess.Value
)
) > 0
)
) > 0
)
)

 

Can you point me out where is the discrepancy in this code?

 

Thank you in advance!

Categories:
  • Cat Schneider Profile Picture
    488 Most Valuable Professional on at

    Is the filter meant to fill or limit the items in the Gallery list? To fill, meaning there's no Gallery items until a record matches a selection; and to limit, in the traditional sense where anything that matches a selection is kept, everything else excluded.

     

    The fields that are to match against the selections, are they multi- or single-select? What about the comboboxes themselves?

  • rumenovk Profile Picture
    11 on at

    Hi, thanks for replying!

    The filters are meant to limit the gallery list - starting from all records to filtering only the ones with the appropriate Process & Role.

    The columns BusinessProcess and BusinessRole are Choices with multiple selections enabled.

    I can select multiple entries in the combobox: 

    rumenovk_0-1681898776374.png

     

  • Cat Schneider Profile Picture
    488 Most Valuable Professional on at

    So then would the following be accurate... show all items: 

    • Where any BusinessProcess selection matches any BoxProcess selection
    • AND
    • Where any BusinessRole selection matches any BoxRole selection

    Or would it be:

    • Where all BusinessProcess selections match all BoxProcess selections
    • AND
    • Where all BusinessRole selections match all BoxRole selection

    Or some other variation? 

  • rumenovk Profile Picture
    11 on at

    Thank you again and I apologize that I cannot explain it in a better way. If that's my list:

    ItemBusinessProcessBusinessRole
    1General, ReportingAdministrator, HR
    2ReportingHR
    3Close, GeneralAdministrator, HR, IT

     

    If I select in the BoxProcess Reporting and in BoxRole HR, it would show 1 & 2

    If I select in the BoxProcess General and Reporting and in BoxRole I select Administrator and HR, it would show 1.

    If I select in the BoxProcess General  and in BoxRole I select Administrator and HR, it would show 1 and 3.

  • Verified answer
    Cat Schneider Profile Picture
    488 Most Valuable Professional on at

    @rumenovk, apologies as I clicked the wrong reply button...
    Try this:

     

    Filter('DataSource',(CountIf(BoxProcess.SelectedItems As i, i.Value in BusinessProcess.Value) = CountRows(BoxProcess.SelectedItems)) * (CountIf(BoxRole.SelectedItems As i, i.Value in BusinessRole.Value) = CountRows(BoxRole.SelectedItems)) = 1)

     

  • rumenovk Profile Picture
    11 on at

    Thank you so much!! Works like a charm!

    Many, many thanks.

  • rumenovk Profile Picture
    11 on at

    Thank you so much!! Works like a charm!

    Many, many thanks.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard