Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Rank does not work

Hey Guys,    I have created a Rank function with a Top/Bottom filter. It's working, but it is acting kinda weird. Please see the attached image does anybody know why is that or what's wrong? It's s...
  • v-yulgu-msft's avatar
    7 years ago

    Hi Anonymous,

     

    Please modify the formula to below for a test.

    Rank = IF(
                        HASONEVALUE('Top/Bottom'[Order]),
                            SWITCH(
                                VALUES('Top/Bottom'[Order]),
                                "Top 10", RANKX(ALLSELECTED(Store_dim),[GP per Customer],,DESC,Dense),
                               RANKX(ALLSELECTED(Store_dim),[GP per Customer],,ASC,Dense)
                            ))

     

    Regards,
    Yuliana Gu