Forum Discussion
RANKING based on two columns - Group & Subgroup
Hi all,
I need to create a ranking in a specific manner; below is a sample data:
I have created GROUP as a calculated column using below measure:
now I need to create another Calculated column but that needs to follow GROUP. In other words, I need to RANK each row based on their TOTAL value. for example, first row > total: 1 is the lowest amongst 4 rows. So I want to rank it as 1.4. Then second row is highest of all for DEALER 1 so it's my 1.1. The same logic is applied for all.
Hi, sshokri89
Please check this example:
Group_Calculated = "Dealer " & RANKX(ALL('TABLE'),'TABLE'[National Group],,ASC,Dense)SubGroup ="Dealer " &RANKX(FILTER('TABLE','TABLE'[National Group] = EARLIER('TABLE'[National Group])),'TABLE'[Total],,DESC)Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
2 Replies
- amitchandak
Super User
Assume total is column , a new column
Group = "Dealer " & RANKX(filter(TABLE,TABLE[National Group] = earlier(TABLE[National Group]) ), [Total],,ASC,Dense)
- ALLUREAN
Solution Sage
Hi, sshokri89
Please check this example:
Group_Calculated = "Dealer " & RANKX(ALL('TABLE'),'TABLE'[National Group],,ASC,Dense)SubGroup ="Dealer " &RANKX(FILTER('TABLE','TABLE'[National Group] = EARLIER('TABLE'[National Group])),'TABLE'[Total],,DESC)Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/