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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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