Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Filter gallery not working when multiple options are selected

(0) ShareShare
ReportReport
Posted on by 494

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:
  • WarrenBelz Profile Picture
    146,986 Most Valuable Professional on at
    Re: Filter gallery not working when multiple options are selected

    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 110 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 81

#3
stampcoin Profile Picture

stampcoin 54

Overall leaderboard