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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,166)