Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Rank if

Could someone give me the M code or DAX formula to achieve the result in column Rank? Many thanks!   Type       Date             Rank Type A    01/01/17     1 Type A    01/02/17     2 Type A    ...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    7 years ago

    Anonymous

     

    As a calculated column..you can use

     

    Column =
    RANKX (
        FILTER ( Primary_ID, [Type] = EARLIER ( [Type] ) ),
        [Date],
        ,
        ASC,
        DENSE
    )