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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register 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
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.