Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
greenawayr03
New Member

Ranking by multiple groupings

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.

 

 

greenawayr03_0-1648670586658.png

Data below

DriverClassRoundPosition
A111
B112
C113
D214
E215
F216
G317
H318
I219
J3110
K2111
L1112
A122
B121
C123
D225
E224
F226
G328
H327
I2211
J3212
K229
L1210
A131
B133
C135
D234
E232
F238
G337
H336
I2312
J3311
K2310
L139

 

I've tried this, but it doesn't give me the correct output.

 
ClassRank =
    RANKX (
FILTER(
            ALL(
                ACC_server_sessionresults[ClassID], ACC_server_sessionresults[Round], ACC_server_sessionresults[Position]
                ),
ACC_server_sessionresults[ClassID] = MAX(ACC_server_sessionresults[ClassID]) &&
ACC_server_sessionresults[Round] = MAX(ACC_server_sessionresults[Round])
),
            Calculate(Min(ACC_server_sessionresults[Position])), , ASC,Dense
            )

 

Many Thanks in advance for any assistance you can provide.

1 REPLY 1
johnt75
Super User
Super User

Class ranking = RANKX( FILTER(ALL(Races), Races[Class] = SELECTEDVALUE('Races'[Class]) && Races[Round] = SELECTEDVALUE( Races[Round])), Races[Position], SELECTEDVALUE(Races[Position]), ASC)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.