Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I have below data and want to calcualte Rank
Root Category | Category | ID |
A | Cat | 3 |
Lion | 1 | |
Pig | 4 | |
Rat | 2 | |
Tiger | 5 | |
B | Cat | 6 |
Lion | 9 | |
Pig | 3 | |
Rat | 4 | |
Tiger | 1 |
Want to create Rank column based on Root Category and Category Column as below
Root Category | Category | ID | Rank |
A | Cat | 3 | 3 |
Lion | 1 | 5 | |
Pig | 4 | 2 | |
Rat | 2 | 4 | |
Tiger | 5 | 1 | |
B | Cat | 6 | 2 |
Lion | 9 | 1 | |
Pig | 3 | 4 | |
Rat | 4 | 3 | |
Tiger | 1 | 5 |
Solved! Go to Solution.
Hi @suren947 ,
Check the formula.
Column = RANKX(FILTER('Table','Table'[Root Category]=EARLIER('Table'[Root Category])),'Table'[ID],,DESC)
If you want add other groups, just add [column] = earlier([column]) to the filter part of the formula.
Best Regards,
Jay
Hi @suren947 ,
Check the formula.
Column = RANKX(FILTER('Table','Table'[Root Category]=EARLIER('Table'[Root Category])),'Table'[ID],,DESC)
If you want add other groups, just add [column] = earlier([column]) to the filter part of the formula.
Best Regards,
Jay
@suren947 , Try a new column
rankx(filter(Table,[Root Category] = earlier([Root Category])),[ID],,desc, dense)
Thank you but expression not working
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
117 | |
101 | |
71 | |
61 |