Ranking by groups using Power query in Power BI

Hello Friends, Today we’ll be learning how to create ranking by groups using Power query in Power BI. Easy and quick tutorial to follow. Power BI is attached used in the tutorial.

Data

The data is looks like below with Team, Salesperson and the value. Here we want to create a column with ranking of Salespersons within the team

Group by

Now we have Group by the teams. Go to Transform > Group By. Select Team and operation as All Rows

Add Ranking column

Now go to Add Column > Custom Column and add the formula

=Table.AddIndexColumn([Count],"Rank",1,1)

Final Table creation

Removing the other 2 columns and expand the newly created custom column as shown in the image below and that’s done.


final table will look something like below

Download the Power BI file


Keep visiting Analytics Tuts for more tutorials.

Thanks for reading! Comment your suggestions and queries.


16 comments

Leave a Reply

Your email address will not be published. Required fields are marked *