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
Community Champion
Community Champion

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
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (4,285)