cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ek21
Level: Powered On

Filtering Gallery by Multiple Dropdown boxes

Hi everyone,

 

I'm still having an issue filtering a gallery on my app and I'm hoping someone can help. Please read the discussion in the link below, it's quite short!

 

 

https://powerusers.microsoft.com/t5/General-Discussion/Filter-gallery-based-on-multiple-dropdowns-Da...

 

Thanks heaps!

1 ACCEPTED SOLUTION

Accepted Solutions
ek21
Level: Powered On

Re: Filtering Gallery by Multiple Dropdown boxes

Hi @v-yamao-msft,

 

Thanks very much for your advice. I managed to find a similar solution that worked:

Filter(StudentActivity, If(IsBlank(YearDrop.Selected.Value), true, Year=YearDrop.Selected.Value) && If(IsBlank(TermDrop.Selected.Value), true, Term=TermDrop.Selected.Value) && If(IsBlank(SectionDrop.Selected.Value), true, Section=SectionDrop.Selected.Value) && If(IsBlank(RegionDrop.Selected.Value), true, Region=RegionDrop.Selected.Value) && If(IsBlank(SchoolsDrop.Selected.Value), true, School=SchoolsDrop.Selected.Value) && If(IsBlank(ActivityDrop.Selected.Value), true, Activity=ActivityDrop.Selected.Value))

 

 

Thanks again for the help!

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Filtering Gallery by Multiple Dropdown boxes

Hi @ek21,

 

I made a test with an Excel table, but I assume that it can also be applied for Google sheet.


In the table, I have a blank row so that the dropdowns could be left without value.


Then on the app, add several dropdown controls(in my case, I added four) and a gallery control.


Set the four dropdown controls items property to:
Dropdown1: Table7.Year
Dropdown2: Table7.Section
Dropdown3: Filter(Table7,Section in Dropdown2.Selected.Section)
Dropdown4: Filter(Table7,Region in Dropdown3.Selected.Region)


Then set the gallery control’s Items property as:

If(IsBlank(Dropdown1.Selected.Value)&&IsBlank(Dropdown2.Selected.Value),Table7,Filter(Table7,Year=Dropdown1.Selected.Value&&Section=Dropdown2.Selected.Value&&Region=Dropdown3.Selected.Value&&Activity=Dropdown4.Selected.Value))


When there is no selection in the dropdown controls, all the items will be returned, otherwise, it will be filtered based on the selections in the dropdowns.


Please take a try with it.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ek21
Level: Powered On

Re: Filtering Gallery by Multiple Dropdown boxes

Hi @v-yamao-msft,

 

Thanks very much for your advice. I managed to find a similar solution that worked:

Filter(StudentActivity, If(IsBlank(YearDrop.Selected.Value), true, Year=YearDrop.Selected.Value) && If(IsBlank(TermDrop.Selected.Value), true, Term=TermDrop.Selected.Value) && If(IsBlank(SectionDrop.Selected.Value), true, Section=SectionDrop.Selected.Value) && If(IsBlank(RegionDrop.Selected.Value), true, Region=RegionDrop.Selected.Value) && If(IsBlank(SchoolsDrop.Selected.Value), true, School=SchoolsDrop.Selected.Value) && If(IsBlank(ActivityDrop.Selected.Value), true, Activity=ActivityDrop.Selected.Value))

 

 

Thanks again for the help!

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,028)