cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sudhavi_84
Helper I
Helper I

Distinct

Hi

I have a list and it has duplicate values.

 

I want to bring only disticnt values in to Gallery

 

I created Screen-->Gallery and selected datasource.. it is displaying all duplicates as well

 

Specified as Distinct(Table.Field) but is coming error

Any leads please? did google and tried in various ways.

 

Thank you in advance

14 REPLIES 14
PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @Sudhavi_84 ,

 

Please try 

Distinct(TableName,ColumnName) 

Result will show only Distinct values of one ColumnName by using Distinct(TableName,ColumnName).Result

 

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.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Thanks @PG_WorXz10  for your quick response

I selected datasource in to Gallery, I can see all duplicates too which is perfect and now I want to display Unique field from that particular field.

All Prj is Table Name in List

Category is Field name from All Prj table

I updated formula as you specified Distinct('All Prj',Category).Result

 

But it says asDistinct('All Prj',Category).Result=  "There is an error in this formula. try revising the formula and running it again"  Data Type:Table

 

Do you know what I am doing wrong here?

Hi @Sudhavi_84 ,

 

In which Control are you trying to add this Distinct value ? 

Is it a dropdown ? or something else 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 ,

 

Inside Gallery, I clicked on pencil(Edit) button, so it a Label not dropdown

 

Sudhavi_84_0-1629981309411.png

 

 

Hi @Sudhavi_84 ,

 

Is not possible to bind a collection type data source in a Label type. You will have to use collection type controls like dropdown, combobox or gallery. 

 

Otherwise please modify your requirement. 

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Thanks @PG_WorXz10 

 

I will create dropdown then and will let you know.

 

Thank you for letting me know.

 

 

@Sudhavi_84 ,

 

Sure. Let me know if any help required further.

 

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.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

hI @PG_WorXz10 ,

 

I added dropdown control into Gallery, and renamed function as Distcinct('Tablename",FieldName)

But it is displaying only one unique field when I click on play button, and I have 2 different values in List.

 

Anything I am doing wrong here please help

Hi @Sudhavi_84 ,

 

Does your datasource has more than 500 items currently ? 

 

Also Try 

Distinct(SourceName,FieldName).Result 

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,077)