Forum Discussion
Rank with the same numbers
Hi Greg_Deckler
i'm using Dense, but the rank is the same when i have the same amount for different categories.
OK, so my understanding is that you want the top 5 categories. But, some of the categories have the same amount that you are ranking on. I guess my question is, how do you want it to work? In your scenario where you have a bunch of ranking "5", do you want it to randomly pick one? What is your expectation?
- Paula8 years ago
Helper I
- Greg_Deckler8 years ago
Community Champion
Possibly, you would want to use the RAND function to generate a random number. Alternatively, you could just use MAX or MIN on the category to grab the first or last one.
- Paula8 years ago
Helper I
In which part of the function should i use RAND?
The function that i'm using is this:
Rank = (RANKX(FILTER('Tabla1'; 'Tabla1'[Id Periodo] = EARLIER('Tabla1'[Id Periodo]))); RANKX(ALL('Tabla1'); 'Tabla1'[Monto]; ;DESC;Dense)))