Forum Discussion

tomwolswijk's avatar
tomwolswijk
Helper I
6 years ago
Solved

Rank date in PowerBI

Hi,   I'm looking for a DAX formule to rank the date kolomn. No extra filters on Client ect, just rank the date. Every month new data is loaded in the PowerBI model. Now i want to add a Kolomn so ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hello @tomwolswijk ,

    You can test this calculated column.

    Rank = 
    RANKX (
        'Table',
        RANKX ( 'Table', YEAR ( 'Table'[Date] ),, DESC, DENSE ) * 100
            + RANKX ( 'Table', MONTH ( 'Table'[Date] ),, DESC, DENSE ),
        ,
        ASC,
        DENSE
    )

    6.png

    More details can be found here.

    Best regards

    Stephen Tao

    If this post helps,then consider Accepting it as the solution to help other members find it faster.