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 where c...
Power Apps
Answered

Filter gallery where column contains all selected values from combo box

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I have a Sharepoint list that has 'Multiple lines of text' columns (example table below) 

 

PersonTable

PersonAgeLikesDislikes
A1This person likes chocolate, strawberry and vanilla ice creamThis person dislikes the cold, and pigeons.
B2This person likes vanilla and pistachio ice cream. This person dislikes the cold and the dark.
C3This person likes strawberry and vanilla ice creamThis person dislikes pigeons. 

 

I have a gallery displaying the data from this table. 

 

I also have a multi-select combo box which I will use to filter the gallery. The combo box options are populated via a separate list. (example below) 

 

Options: Vanilla, Chocolate, Strawberry, pistachio.

 

I would like to select multiple items from the combo box and return rows that match ALL of the selected values. 

 

Example case:

I select Vanilla from the combo box and all rows are returned because they all contain vanilla in their 'Likes' column. I then select strawberry and the gallery returns person A and person C as their "Likes" column contains both Vanilla and Strawberry. Person B is not returned as their 'Likes' column does contain vanilla but not strawberry. 

 

I have managed to filter the gallery based on a single value from a combo box but not where it needs to match all values. 

That function looks like this: 

Filter(PersonTable, ComboBox.Selected.Value in Likes)

 

I have tried: 

Filter(PersonTable, ComboBox.SelectedItems in Likes)

 
But that returns the following error: 
Invalid argument type. Cannot use Table values in this context.

 

Any suggestions?

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @rstvns ,

     

    Please try this

    vxiaochenmsft_0-1705023649095.png

    vxiaochenmsft_1-1705023665009.png

    vxiaochenmsft_2-1705023675747.png

    Filter(ForAll(LIST49,If(CountRows(Filter(ForAll(ComboBox1.SelectedItems,If(Value in Likes,ThisRecord)),!IsBlank(Value)))=CountRows(ComboBox1.SelectedItems),ThisRecord)),!IsBlank(ID))

     

    Best Regards,

    Wearsky

     

  • rstvns Profile Picture
    4 on at

    Hi @v-xiaochen-msft,

    That's worked perfectly, thanks for your help!

     

    Another quick question - If I wanted to add a second combo box filter, where within the above would I place the code?

     

    Example of second filter

    Filter(NameTable, Name = ComboBox.Selected.Value || IsBlank(ComboBox1.Selected.Value))

     

    Kind regards,

    Rhys

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 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard