Forum Discussion

Paula's avatar
Paula
Helper I
8 years ago

Rank with the same numbers

Hello! i'm having some problems whit the function RANKX.

 

What can i do if i have the same amount in different categories and i want to do a rank? i want to see only the top 5, but the rank 5 is 11 times, so how can i choose some of them? 

 

Example:

 

 

Thanx!

9 Replies

    • Paula's avatar
      Paula
      Helper I

      Hi Greg_Deckler

       

      i'm using Dense, but the rank is the same when i have the same amount for different categories.

       

       

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        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?

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi Paula,

     

    Which some of them do you want? Are there any other conditions? If it's possible to sort Amount in the Query Editor and add an index?

     

     

    Best Regards,

    Dale

    • Paula's avatar
      Paula
      Helper I

      Hi v-jiascu-msft

       

      I have no preference. If I add an index, can I choose one of the categories and obtain the top 5? In case of adding an index, what would the DAX be like?

       

      There is no other condition.