Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have an issue that I can see similar questions to, but have not been able to get a solution from them that quite fits. Hoping for some help please.
My scenario is that I'm collecting data from a race server for online racing. The drivers on the server are split into "Class" based on ability. For each race that takes place on the server I'm looking to create a ranking per class based on their finishing positions. So the data would look a little like this with the Class Rank Column being the output I'm looking for.
Data below
Driver | Class | Round | Position |
A | 1 | 1 | 1 |
B | 1 | 1 | 2 |
C | 1 | 1 | 3 |
D | 2 | 1 | 4 |
E | 2 | 1 | 5 |
F | 2 | 1 | 6 |
G | 3 | 1 | 7 |
H | 3 | 1 | 8 |
I | 2 | 1 | 9 |
J | 3 | 1 | 10 |
K | 2 | 1 | 11 |
L | 1 | 1 | 12 |
A | 1 | 2 | 2 |
B | 1 | 2 | 1 |
C | 1 | 2 | 3 |
D | 2 | 2 | 5 |
E | 2 | 2 | 4 |
F | 2 | 2 | 6 |
G | 3 | 2 | 8 |
H | 3 | 2 | 7 |
I | 2 | 2 | 11 |
J | 3 | 2 | 12 |
K | 2 | 2 | 9 |
L | 1 | 2 | 10 |
A | 1 | 3 | 1 |
B | 1 | 3 | 3 |
C | 1 | 3 | 5 |
D | 2 | 3 | 4 |
E | 2 | 3 | 2 |
F | 2 | 3 | 8 |
G | 3 | 3 | 7 |
H | 3 | 3 | 6 |
I | 2 | 3 | 12 |
J | 3 | 3 | 11 |
K | 2 | 3 | 10 |
L | 1 | 3 | 9 |
I've tried this, but it doesn't give me the correct output.
Many Thanks in advance for any assistance you can provide.
Class ranking = RANKX( FILTER(ALL(Races), Races[Class] = SELECTEDVALUE('Races'[Class]) && Races[Round] = SELECTEDVALUE( Races[Round])), Races[Position], SELECTEDVALUE(Races[Position]), ASC)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |