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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

RANKX with RAND() to break ties does not work

Hello,

I have a problem trying to break ties in a RANKX function using RAND().

Here is my measure without RAND :

TOP_5_Profession_M_norand = RANKX(ALL(Infos_Devis_AFN[Profession]),[NB_AFN_M])

Works fine : but I need to break ties so i'm adding +RAND() to [NB_AFN_M] to get [NB_AFN_M_rand] and then:

TOP_5_Profession_M = RANKX(ALL(Infos_Devis_AFN[Profession]),[NB_AFN_M_rand])
 

But this is not working at all, every time I refresh the visual, i get different values and i do not understand why...

maxlgv2_0-1675087688585.png

 

Could someone helps me to understand why ?

 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , refer

Rank Tie breaker
https://community.powerbi.com/t5/Community-Blog/Breaking-Ties-in-Rankings-with-RANKX-Using-Multiple-Columns/ba-p/918655
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.