Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 @Anonymous ,
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 @Anonymous ,
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
@Anonymous , Try a new column
rankx(filter(Table,[Root Category] = earlier([Root Category])),[ID],,desc, dense)
Thank you but expression not working
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |