Forum Discussion
Anonymous
1 year agoNot applicable
Eliminating duplicates rows in table
My table has the folowwing data. I only want the row where Col2 has the max value. Is there a method to do this at the Table view level? If not what would be an alternative mehtod? Col1 Col2 ...
- Anonymous1 year ago
Hi Anonymous ,
Please try this code in power query advanced editor,
let Source = #table( {"Col1", "Col2"}, { {1, 1}, {1, 2}, {1, 3}, {2, 2}, {2, 3}, {2, 4}, {3, 5}, {3, 4}, {3, 3} } ), NewTable = Table.Group( Source, {"Col1"}, {{"Col2", each List.Max([Col2])}} ) in NewTableBest Regards,
Bof
dharmendars007
1 year agoMemorable Member
Hello Anonymous ,
Please try the below code..
FilteredTable =
FILTER(YourTable, YourTable[Col2] = MAX(YourTable[Col2]))
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
Anonymous
1 year agoNot applicable
dharmendars007, Where does this code get placed?