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

Filter Gallery Using Distinct Dropdown

Hi,

 

Still very new to this and cannot seem to figure out how to do it!

So I have a single gallery displaying data from a sharepoint list. I can filter that gallery using four dropdown boxes using the following formula which works fine:

 

Filter(SPList,County = Dropdown1.Selected.County,YOB = Dropdown2.Selected.YOB,Ethnicity = Dropdown3.Selected.Ethnicity,Connection = Dropdown4.Selected.Connection)

The issue is that the options in the dropdowns themselves contain multiple values where I only need to display one.

I tried using the following Distinct formula on each dropdown box which works fine:

 

Distinct(Stories_1,County)

Problem is this then breaks the gallery filter formula - what do I need to change here?

 

Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filter Gallery Using Distinct Dropdown

When using the Distinct function, it changes the resulting column name to Result instead of what it used to be. That means that for each Dropdown that uses a Distinct formula, the reference would end in “Result”. So for Dropdown1, it would be Dropdown1.Selected.Result instead of Dropdown1.Selected.Country. Changing this for each Dropdown that uses a Distinct function should get your Filter working.

 

 

5 REPLIES 5
Super User
Super User

Re: Filter Gallery Using Distinct Dropdown

Heya,

 

When you make them distinct, they dont have other values like YOB, they are just a list of distinct values, so they will probably be Dropdown1.Selected.Result etc etc

 

Cheers,

ManCat



My loving and understanding partner gives the best advice on fixing errors: "Just type in some different things".

Don't forget to Mark as Solution and Thumbs Up those who deserve it!
Super User
Super User

Re: Filter Gallery Using Distinct Dropdown

When using the Distinct function, it changes the resulting column name to Result instead of what it used to be. That means that for each Dropdown that uses a Distinct formula, the reference would end in “Result”. So for Dropdown1, it would be Dropdown1.Selected.Result instead of Dropdown1.Selected.Country. Changing this for each Dropdown that uses a Distinct function should get your Filter working.

 

 

Super User
Super User

Re: Filter Gallery Using Distinct Dropdown

Oops! I should have refreshed before posting! Sorry for the echoed answer there @iAm_ManCat and @MP4249Smiley Embarassed

Super User
Super User

Re: Filter Gallery Using Distinct Dropdown

No worries!

 

And yeah I forgot that it's .Result not .Value - Have updated my first answer to .Result Smiley Happy



My loving and understanding partner gives the best advice on fixing errors: "Just type in some different things".

Don't forget to Mark as Solution and Thumbs Up those who deserve it!
MP4249
Level: Powered On

Re: Filter Gallery Using Distinct Dropdown

Thanks!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 31 members 4,344 guests
Recent signins:
Please welcome our newest community members: