cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Distinct on multiple Columns

Hi,

 

How can i return a table containing the distinct rows based on multiple columns?

My understanding is the distinct function does not support this, however I imaging this may be possiable using a combination of the group by and ungroupby funcations?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

The concatinated column solution was not suited toward my particular implementation. 

In the intersted of assisting others, the solution i used was to use the GrouBy function. This function will allow you to group by multiple columns and effectly peform a distinct filter on multiple columns. you may want to follow this with ShowColumns function call to filter the returned columns down to only the set you require

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Have you tried adding a calc column to the table that joins your othe columns,  then doing a distinct on that?

 

Highlighted

This would solve a small part of the problem. What i requre is a table/collection (with multiple columns) to be returned. The suggested solution would return a single column table. 

The approach I was suggesting is to create a calculated column in the SharePoint List with those columns concatenated.  This would then be avaiable to place in a collection which you could use or the table.  the collection  can also have the multiple columns the calc field was based on

Highlighted

The concatinated column solution was not suited toward my particular implementation. 

In the intersted of assisting others, the solution i used was to use the GrouBy function. This function will allow you to group by multiple columns and effectly peform a distinct filter on multiple columns. you may want to follow this with ShowColumns function call to filter the returned columns down to only the set you require

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,547)