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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Chrisjr
Helper IV
Helper IV

Rankx with ties

Hello All, 

 

I have a ranking issue I can't solve. 

 

I have the below table: 

Chrisjr_2-1708509463030.png

1 same group can have multiple dealers. 

 

My ranking formula is  the following: 

ranking test = IF(NOT (ISBLANK([Score in %])),CALCULATE(RANKX(ALLSELECTED(Lookup__Dealer), [Score in %], , DESC)), BLANK())
 
 
This works well. However, when I add the Region  column (coming from a separate dim table), it gives me ties:
Chrisjr_3-1708509551202.png

 


Suddenly, the dealer who was number 1 became number 2 and the number 2 and 3 both became number 3. Therefore, if in my slicer I select bottom 1, it will show me blank value.

 

 

I need the bottom 1 to remain 1 when I add the Region column like as below:

N GroupDealer Full NameRanking testscore in %Region
125.......7371,11FR
573.......6262,22NL
573........2149,44NL

 

And If I select the Region NL in a slicer, I need my ranking to adapt iself as below:

N GroupDealer Full NameRanking testscore in %Region
573.......6262,22NL
573........2149,44NL

 

 

How could I achive this ?

 

 

Thanks

1 REPLY 1
talespin
Solution Sage
Solution Sage

hi @Chrisjr 

 

Please try something like this, correct the table/column names. If it doesn't work, please share sample data, few rows from tables involved in this visual(remove any sensitive information).

RANK( DENSE, ALLSELECTED(Lookup__Dealer), ORDERBY( [Score in %], DESC))

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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