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?
Solved! Go to Solution.
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
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
User | Count |
---|---|
182 | |
105 | |
89 | |
45 | |
43 |
User | Count |
---|---|
226 | |
106 | |
105 | |
67 | |
67 |