Forum Discussion

Stemar_Aubert's avatar
Stemar_Aubert
Icon for Resolver I rankResolver I
6 years ago
Solved

RANKX values while excluding some items, with a twist.

Hello,   I have the following measure:   EyzRank = SWITCH ( ISBLANK ( 'Actual'[YTD 19] ), FALSE (), RANKX ( ALLSELECTED ( Reps[INDUSTRY REP] ), 'Actual'[YTD 19] ), BLANK () )    I...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Stemar_Aubert ,

     

    You can try add conditions before using RANKX().

    Please refer to the formula below.

     

     

    Measure 2 =
    IF (
        ISFILTERED ( 'Table'[region] ),
        RANKX (
            FILTER ( ALL ( 'Table' ), 'Table'[region] = SELECTEDVALUE ( 'Table'[region] ) ),
            [Measure],
            ,
            ASC
        ),
        RANKX ( ALL ( 'Table' ), [Measure],, ASC )
    )

     

     

    Result would be shown as below.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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