Forum Discussion

NSC7's avatar
NSC7
Icon for Helper I rankHelper I
4 years ago
Solved

Ranking with multiple column not working

Hi All,

 

I need to create Rank column as shown below. I have created below measure but it is not working as expected.

Rank for each date and based on the count for each family rank should be decided.

 

Count = Count(ID)

Rank = RANKX(ALL('Table'[Dateate], 'Tabke'[Family]),[Count],,desc,Dense)

 

Expected result-

 

 

  • Hi NSC7 

     

    Can you adjust your column to the following:

     

    Rank = RANKX ( FILTER ( 'Table' , 'Table'[Family] = EARLIER ( 'Table'[Family] ) ) , 'Table'[Count] , , ASC , Dense )

     

    Hope this helps!

    Theo

  • Hi, NSC7 

     

    You can try the following methods.

    Rank =
    RANKX (
        FILTER ( 'Table', 'Table'[Date] = EARLIER ( 'Table'[Date] ) ),
        [Count],
        ,
        DESC,
        DENSE
    )

    Is this the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • TheoC's avatar
    TheoC
    Icon for Community Champion rankCommunity Champion

    Hi NSC7 

     

    Can you adjust your column to the following:

     

    Rank = RANKX ( FILTER ( 'Table' , 'Table'[Family] = EARLIER ( 'Table'[Family] ) ) , 'Table'[Count] , , ASC , Dense )

     

    Hope this helps!

    Theo

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, NSC7 

     

    You can try the following methods.

    Rank =
    RANKX (
        FILTER ( 'Table', 'Table'[Date] = EARLIER ( 'Table'[Date] ) ),
        [Count],
        ,
        DESC,
        DENSE
    )

    Is this the output you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.