Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I feel like this one should be really simple, but I can't seem to work it out. I have a very basic, static table with a persons name and a score. I would like to rank those score within the individual. Example:
Dataset:
| Person | Score |
| John | 50 |
| John | 75 |
| John | 50 |
| John | 100 |
| Tom | 50 |
| Tom | 75 |
| Tom | 100 |
| Tom | 100 |
| Dave | 50 |
| Dave | 75 |
| Sally | 50 |
Desired Result:
| Person | Score | Rank |
| Dave | 50 | 2 |
| Dave | 75 | 1 |
| John | 50 | 3 |
| John | 50 | 3 |
| John | 75 | 2 |
| John | 100 | 1 |
| Sally | 50 | 1 |
| Tom | 50 | 3 |
| Tom | 75 | 2 |
| Tom | 100 | 1 |
| Tom | 100 | 1 |
If I use Rank = Rankx('Table','Table'[Score],,DESC,DENSE) it will rank all of the scores, not bound to an individual.
If I use Rank = Rankx(ALLEXCEPT('Table','Table'[Person]),'Table'[Score],,DESC,DENSE) then I get a circular dependancy error.
Am I missing something obvious here? I feel like I am...
Thanks again for all your help!
Solved! Go to Solution.
The ALLEXCEPT function is a bit weird when used as a table function. I you're trying to write a calculated column, I'd suggest this version instead.
RANKX (
FILTER ( 'Table', 'Table'[Person] = EARLIER ( 'Table'[Person] ) ),
'Table'[Score],, DESC, DENSE
)
The ALLEXCEPT function is a bit weird when used as a table function. I you're trying to write a calculated column, I'd suggest this version instead.
RANKX (
FILTER ( 'Table', 'Table'[Person] = EARLIER ( 'Table'[Person] ) ),
'Table'[Score],, DESC, DENSE
)
Hi AlexisOlson,
Works like a charm! Thank you for the assist.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 35 | |
| 33 | |
| 32 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 96 | |
| 77 | |
| 67 | |
| 65 |