Forum Discussion
Return Column if Highest Value
- 7 years ago
If you're OK throwing away all the data in the rows with duplicated IDs, then this is very easy in Power Query.
Open the query editor, and sort the table by Degree Weight. Then right click the ID column header and select Remove Duplicates. This will keep only the data rows where the ID first appears, which right now is ordered by Degree Weight.
If this is throwing away too much data, (like you want each person's highest weighted degree in each field of study) you can CTRL+click each of the columns that you want to keep unique values in, right click, and remove duplicates.
If you're OK throwing away all the data in the rows with duplicated IDs, then this is very easy in Power Query.
Open the query editor, and sort the table by Degree Weight. Then right click the ID column header and select Remove Duplicates. This will keep only the data rows where the ID first appears, which right now is ordered by Degree Weight.
If this is throwing away too much data, (like you want each person's highest weighted degree in each field of study) you can CTRL+click each of the columns that you want to keep unique values in, right click, and remove duplicates.
Not sure if meant to makes changes to the data model or just want a visual with just the max value per id.
Check this if you need the latter.
https://docs.microsoft.com/en-us/power-bi/service-aggregates