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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.