cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnthonyPhan
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

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
leyburn19
Memorable Member
Memorable Member

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

 

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

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (31,757)