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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
PowerRon
Post Patron
Post Patron

RANKX and tie breaker

Hi

 

I am using tie breaker for the first time but can't get it working.
Maybe someone can help.


https://www.dropbox.com/scl/fi/rtv3ghfv12g1vg7fp0vmt/test.pbix?rlkey=pipd1q7kysjmok758og3bmlsg&dl=0 

If you look at the table in the attached pbix you see 4 measures:

  1. Sum Quantity. on which the table now is sorted (ascending)
  2. RankSum. For Sum Quantity value 371 the ranking is equal, being 172
  3. Rand
  4. RankRand

In measure 4 I use measure 3. I thought by using this the Rank of Fatz Group would become 173 (instead of 172) and that of SHISEIDO Ltd would become 164 instead of 163.
But that's not happening. 
I also don;t know why the Rand of Fatz Group and Voonyx Group is still the same.

Can someone help me?

Regards
Ron

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @PowerRon ,

 

Try the following code:

 

RankSum = 
RANKX(ALLSELECTED('Customers'[Customer Names]),
[Sum Quantity]+CALCULATE( SUM(Customers[Customer Index])/100)
    
,,DESC)







Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

I'd solve it with the RANK function

Measure = RANK(DENSE,SUMMARIZE(ALLSELECTED(Sales),Customers[Customer Names],"A",[Sum Quantity]),ORDERBY([A],desc,Customers[Customer Names],desc))

Hope this helps.

Ashish_Mathur_0-1703396491030.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
MFelix
Super User
Super User

Hi @PowerRon ,

 

Try the following code:

 

RankSum = 
RANKX(ALLSELECTED('Customers'[Customer Names]),
[Sum Quantity]+CALCULATE( SUM(Customers[Customer Index])/100)
    
,,DESC)







Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Hi Miguel, thnx. It works. Why doesn't it work with RAND()? Any idea?

Regards
Ron

Because when you use the rand has a measure the value gets recalculate and usually for the metric where you reusing the value its always the same so no difference. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.