Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Distinct in a Gallery

I have a gallery connected to a SQL table. There are multiple columns that I want the gallery to be connected to, but 1 of those columns I want to use a distinct filter on. However when I use the distinct filter, I cannot use any of the other columns in the galley, only the resulting column from the distinct function. How can I use the distinct column and another column from the table in a gallery. 

Super User II
Super User II

Hi @mrizz 

To filter your gallery on a unique set of values, put a dropdown outside of the gallery and set its items property to  




Make the gallery items property:




Distinct() takes a single field in the datasource and creates a 1 column table of unique values from the selected field and names it "Result". 

If (for some reason) you want the have a dropdown inside of the gallery, you can put the same one there and change the Default to ThisItem.Column2makeUnique. 

Replace the "Column2makeUnique" above with the name of the field you are referring to.

Community Support
Community Support

Hi @mrizz :

Do you want to get the table after removing duplicate data based on a certain field.

My method is to use forall and lookup nested way to get the table:




I've made a test for your reference:

My data source:'List A'


1\Add a gallery and set it's Items property to:


ForAll(Distinct('List A',Title),LookUp('List A',Title=Result))



Duplicate records are eliminated,at the same time all fields are reserved.

Best Regards,


Helpful resources

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 Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (35,112)