Forum Discussion

AlexanderBrueck's avatar
AlexanderBrueck
Regular Visitor
7 years ago
Solved

Rank values without duplicate ranking

Dear Community,   I tried to get the ranking displayed in column "Rank" by using Rankx - without success.   The idea is to rank the amounts in column "€" for each month. When there are duplicate ...
  • Zubair_Muhammad's avatar
    7 years ago

    AlexanderBrueck 

     

    We can take help from an Index column to manage duplicates

    First add an index columm from Query Editor. Then this DAX calculated column

     

    Rank Column =
    RANKX (
        FILTER (
            Table1,
            Table1[date].[Month] = EARLIER ( Table1[date].[Month] )
                && Table1[date].[Year] = EARLIER ( Table1[date].[Year] )
        ),
        [Euro]
            - [Index] / POWER ( 10, 9 ),
        ,
        DESC,
        DENSE
    )