I'm looking to rank the top 5 highest values per company in a list preferably in power query. I have a list of companies in a column (col A of the attached) and then an amount (col B of the attached). I've already used PQ to sort the companies alphabetically and the amounts in descending order. The table is dynamic and there's no way for me know how many values will exist for Company A, B or C each time I run the report or when companies will be added over time. I'm looking to create a new table that only retains the top 5 highest values per company. Duplicate values within the company should still count up so I only have a max value of 5 rows per company.
Once I can figure out how to rank these properly I can just filter out anything that is not a top 5 and continue on with the query. Appreciate your help.
Bookmarks