Skip to main content
Microsoft Idea

Power BI

Needs Votes

RANKX new tie-breaking argument (SKIP, DENSE exist now...) RANDBREAK

Vote (16) Share
Matt H's profile image

Matt H on 19 Sep 2019 08:58:49

I'd like a way for RANKX to arbitrarily/randomly break runs of tied data. An example set of 5 categories could see a ranking such as the following Blue - 1, Yellow - 2, Red - 3, Green - 3, Pink - 5 using the SKIP argument. I'd like, in this example, for either Red or Green to see a 4 as its rank. I don't care how it happens, just need it to be a series of rank values in certain use-cases, rather than grouping the ties.

Comments (4)
Matt H's profile image Profile Picture

Kevin Liew on 15 Jun 2023 06:10:53

RE: RANKX new tie-breaking argument (SKIP, DENSE exist now...) RANDBREAK

bump... RANKX() needs to support Tie Breaker.

Matt H's profile image Profile Picture

jeffrey Weir on 16 Aug 2020 04:17:25

RE: RANKX new tie-breaking argument (SKIP, DENSE exist now...) RANDBREAK

I've needed to break ties previously in a non-random way, and did it by having a CustomerID table with a numerical index that I then divided by a very large number, which leaves a very small number for each CustomerID. I then added that in my measure to whatever else I was measuring, which got rid of the tie breaks.

Matt H's profile image Profile Picture

Steve on 16 Aug 2020 04:16:03

RE: RANKX new tie-breaking argument (SKIP, DENSE exist now...) RANDBREAK

This is particularly difficult to replicate in DAX currently, and would be a very useful (though admittedly potentially dangerous) third option. I like the name "Randbreak" too (better than "Unique" , "Tiebreak", etc)

Matt H's profile image Profile Picture

Matt H on 16 Aug 2020 04:16:03

RE: RANKX new tie-breaking argument (SKIP, DENSE exist now...) RANDBREAK

Thanks Steve! I agree, to achieve desired results your data needs either a unique ID field or a date field which you know will be unique in any filter context.

Hope they can add it!