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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

need help with Ranking in DAX

Below is my data

 

PersonPriceCallsMeasure - Price/Calls
Tom6319.8510261.95931373
Harry3345.95956.71016949
Gina7678.5513756.04781022
George10882.3520852.31899038
Arnold9239.5519746.90126904
Frank8605.618446.76956522
Peter9338.820645.33398058

 

 Below is my code for ranking

 

RANKX (ALLSELECTED(Table ), CALCULATE(SUMX(Table,Table[Measure - Price/Calls])))
 
and I keep getting everything as Rank 1.
 
PersonPriceCallsMeasure - Price/CallsRank
Tom6319.8510261.959313731
Harry3345.95956.71016949

1

Gina7678.5513756.047810221
George10882.3520852.318990381
Arnold9239.5519746.901269041
Frank8605.618446.769565221
Peter9338.820645.333980581
 
 
Below is what I am looking for 
 
PersonPriceCallsMeasure - Price/CallsRank
Tom6319.8510261.959313731
Harry3345.95956.710169492
Gina7678.5513756.047810223
George10882.3520852.318990384
Arnold9239.5519746.901269045
Frank8605.618446.769565226
Peter9338.820645.333980587
 
Please help.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Oh, I thought it was just a table and each person had one piece of data.

You may try the followings:

RANKX( ALLSELECTED( Table), 
       CALCULATE( [Price divided by Calls], ALLEXCEPT( Table, Table[Person])),
       ,
DESC,
Dense)

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

May I know why you use SUMX in your expression? I think it can be as simple as below:

RANKX( Table, Table[Measure - Price/Calls])

Anonymous
Not applicable

 

Below is a snapshot of the data that i am working with and with your code for Rank i get below.

 

 

2.PNG

 

Capture.PNG

 

Not sure what am i missing here. 

Anonymous
Not applicable

Oh, I thought it was just a table and each person had one piece of data.

You may try the followings:

RANKX( ALLSELECTED( Table), 
       CALCULATE( [Price divided by Calls], ALLEXCEPT( Table, Table[Person])),
       ,
DESC,
Dense)
Anonymous
Not applicable

Thank you so much @Anonymous ...that worked.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors