Forum Discussion

MichaelaMul's avatar
MichaelaMul
Helper III
2 years ago
Solved

Fix Rank Measure

Hi everyone,   I made the measure below and it was working fine, but then I added the Segment to the table, so it is ranking it by segment rather than the entire product list that is filtered in th...
  • Anonymous's avatar
    Anonymous
    2 years ago

    ThxAlot  Ashish_Mathur ,thanks for your concern about this case.

     

    Hi MichaelaMul  , I used the data you provided and wrote the following DAX:

    Rank = 
        IF(
        NOT ( ISBLANK ( 'TEST'[Total Dollar per $MM] ) ),
        RANKX (
            FILTER (
                ALLSELECTED('TEST'),
                NOT ( ISBLANK ( [Total Dollar per $MM] ) )
            ),
            [Total Dollar per $MM],
            ,
            DESC,
            Dense
        )
    )
    

     

    This is the result you want:

     

     

     

    Best Regards,

    Jayleny

     

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