Forum Discussion

KH_Mike's avatar
KH_Mike
Helper III
5 years ago
Solved

Rank Two Column

Hi All,   I want to know how to use DAX to rank like this?   Country Customer Sales Amount Ranking CN ABC 200 4 CN DEF 100 5 CN GHI 300 3 CN JLK 400 2 CN MNO 50...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    5 years ago

    Hi, KH_Mike 

    Thank you for your feedback.

    Do you want to create a column or a measure? 

    My formula above is, as I already mentioned above, for creating a new column.

    Please check the below for creating a new measure.

     

     

    Ranking Measure =
    RANKX (
    ALLEXCEPT ( 'Table', 'Table'[Country] ),
    CALCULATE ( SUM ( 'Table'[Sales Amount] ) ),
    ,
    DESC
    )
     
     

    Hi, My name is Jihwan Kim.


    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM