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 / Multiple Filters on Ga...
Power Apps
Answered

Multiple Filters on Gallery with choices column(ComboBox)

(0) ShareShare
ReportReport
Posted on by 158

I have a SharePoint list, and tag column with multiple selections (choices),

trying to multiple filters on gallery with multiple selections.
I do the same work with Reza Dorrani's PowerApps Multiple Filters on Gallery on youtube.

I set Gallery.Items the function below:

 

Search(Filter('DataSource', IsBlank(ComboBox.SelectedItems.Value) || IsEmpty(ComboBox.SelectedItems) || 'TagColumn' in ComboBox.SelectedItems), SearchBox.Text, "Title")

 

Every part is works well,
but <'TagColumn'> keep showing : Invalid argument type. Cannot use Table in this context.

 

Then I tried : TagColumn = ComboBox.SelectedItems
but <=> shows : Cannot compare table (Both of data type are table)

 

So I'm wondering the function just works on Dataverse database, but SharePoint?
Or I missed something else?

Any advise and information would be appreciate!!

Categories:
I have the same question (0)
  • victorcp Profile Picture
    2,350 Moderator on at

    Your filter works when you have a 1:N relation but as far as I can see it is a N:N relation.

     

    One way to filter is:

    • checking if exists a selected value that is not in the TagColumn
    • if not (all the selected items are in the column) it will get the item

    So the expression will be something like this:

     

    Search(
     Filter(
     'DataSource',
     IsBlank(ComboBox.SelectedItems.Value) ||
     IsEmpty(ComboBox.SelectedItems) ||
     !(false in ForAll(
     ComboBox.SelectedItems,
     Value in 'TagColumn'.Value
     ))
     ),
     SearchBox.Text,
     "Title"
    )

     

    I hope it helps 🙂

  • Verified answer
    WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @LinTse ,

    On the assumption that TagColumn is a multi-value Choice column and ComboBox is a multi-choice control

    With(
     {
     wData:
     If(
     Len(ComboBox.SelectedItems.Value) = 0,
     DataSource,
     Ungroup(
     ForAll(
     ComboBox.SelectedItems As aSel,
     Filter(
     DataSource,
     aSel.Value in TagColumn.Value
     )
     ),
     "Value"
     )
     )
     },
     Search(
     wData,
     SearchBox.Text, 
     "Title"
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard