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 not wor...
Power Apps
Unanswered

Filter gallery not working when multiple options are selected

(0) ShareShare
ReportReport
Posted on by 531

I have powerapps with SharePoint as the datasource. I have 2 filters i.e. by category and by price.

 

When i filter by single category, it works fine. However if i select multiple categories at a time, filter doesnt work.

 

Each filter is a button.

 

Also, i want to combine category filter with pricing filter. Any idea how to achieve this?

 

Below is the code on

 

Gallery Items property

If(
varSelection = "All"||varSelection=Blank(),
Filter(
Items,
(TextInput1.Text in 'Item Name' || TextInput1.Text in Description || TextInput1.Text in 'Price' || TextInput1.Text in 'Category')
),
Filter(
Items,
(TextInput1.Text in 'Item Name' || TextInput1.Text in Description || TextInput1.Text in 'Price' || TextInput1.Text in 'Category') && varSelection = 'Category'
)
)

 

Each Button OnSelect

UpdateContext({varSelection:"Others"})

UpdateContext({varSelection:"Wine and Spirits"})

UpdateContext({varSelection:"Luxury Goods"})

 

Filter Screenshot

 

Iantaylor2050_0-1687693344582.png

 

 

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Iantaylor2050 ,

    I do not believe you will do this with buttons (how do you unselect and you would need multiple Variables). If you have a Multi-select Combo Box with the Items

    [
     "All",
     "Others",
     "Luxury Goods",
     "Wine and Spirits"
    ]

    then the Items of the Gallery

    Filter(
     Items,
     (
     TextInput1.Text in 'Item Name' || 
     TextInput1.Text in Description || 
     TextInput1.Text in 'Price' || 
     TextInput1.Text in 'Category'
     ) &&
     (
     (
     "All" in cbName.SelectedItems || 
     IsEmpty(cbName.SelectedItems
     ) || 
     cbSelectedItems in Category
     )
    )

     

    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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard