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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
liliachante
Frequent Visitor

Unique value for a rank

Hi,

I need a unique value for a ranking measure, but as my column has the same value ,the index doesn't increment. I Have two columns: 

Fruit and Fruit_Number. I create a measure totalFruit where I calculate a sum:

TotalFruit = SUM(Fruit[Fruit_Number])
Then I create a rank : 
Rank = RANKX(ALLSELECTED(Fruit);Fruit[TotalFruit];;DESC;Dense)
as Apricot and lemon have the same number 8, the value of the rank is 2 for each of them. I need 2 and 3 instead of having two 2; It's work with column but I don't want to use column . I need Measure.
 
Rank.PNG
Thank you in advance for your help.
 
Lilia

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @liliachante 

 

Try the below article -  "Breaking Ties" section is what you need.
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @liliachante 

 

Try the below article -  "Breaking Ties" section is what you need.
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors