cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sammy
Helper IV
Helper IV

Filtering gallery with multiple checkboxes

I am trying to add a basic checkbox filter onto my gallery but I can't seem to get them working together, only seperately.

 

The options within the gallery are: Car, Home, Car and Home.

 

What I want is when you select the Car checkbox, that it shows the Car and Car and Home options. SImilarly when you select the Home checkbox it shows you Home and Car and Home. When both are selected I want every option from my document library to show.

 

Below is my code and screenshots of what I'm getting. You can clearly see in screenshot 1 that when both checkboxes are ticked, none of the Home options are showing (red text).PowerApps1.pngPowerApps2.png

 

SortByColumns(If(CarCheckbox.Value=true, Filter('TRU Only Documents',CarCheckbox.Text in Product.Value),HomeCheckbox.Value=true, Filter('TRU Only Documents',HomeCheckbox.Text in Product.Value)),
"FriendlyName", Ascending)
1 REPLY 1
v-monli-msft
Community Support
Community Support

Hi @Sammy,

 

Try below formula instead:

SortByColumns(If(CarCheckbox.Value=true && HomeCheckbox.Value=false, Filter('TRU Only Documents',CarCheckbox.Text in Product.Value),HomeCheckbox.Value=true && CarCheckbox.Value=false, Filter('TRU Only Documents',HomeCheckbox.Text in Product.Value),CarCheckbox.Value=true && HomeCheckbox.Value=true,'TRU Only Documents'),
"FriendlyName", Ascending)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,863)