Forum Discussion

DeanUW's avatar
DeanUW
Helper I
4 years ago
Solved

RankX

Trying to rank sales agents based on year to date total.  The basic DAX function 

 

2022 GBA Rank = RANKX(ALL('Vendor Name'[Broker Full Name]), CALCULATE([2022 GBA Total]))
 
worked fine until I attempted to add another column to the table indicating if they are a shareholder or not. Now the RankX function is creating a seperate ranking for the shareholders and the non-shareholders but keeps them sorted based on their total.
 

3 Replies

  • DeanUW , Rank will done for a column use in Rank inside the other column present in visual (mean rank will for broker full name inside Shareholder flag )

     

    Try like

    2022 GBA Rank = RANKX(ALL('Vendor Name'[Broker Full Name], 'Vendor Name'[Shareholder flag ]), CALCULATE([2022 GBA Total]))

     

    USe summarize if the are from different tables

     

    For Rank Refer to these links
    https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

    • DeanUW's avatar
      DeanUW
      Helper I

      That worked thank you for the assist!

  • Best regards, members of the community.

    I have this situation: I have tried to create a ranking ranking of the training programs that have the best score for an indicator called Varindice; But unfortunately it classifies me so that in some cases the score is repeated, and when I apply filters on the dashboard it does not take the classification based on it, but in a general way. I appreciate your support:

    When I apply a filter, it comes out like this, when it should be the 1 first in the row and it comes out is 4: