Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

RANKX + Others without calculated column

Hi,

 

I have seen a lots of topics talking about it, but every time, it was about creating new tables or calculated columns ; I cannot.

I use DirectQuery mode, and I want to have a pie chart with Top 5 turnover and "Others" category represented.

 

I hope to have not missed the right topic, but here is this one.

 

I already have a rank measure which ranks the cities by turnover.

 

Thank you.

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Try below measure,

    Rank =
    var a =RANKX(ALLSELECTED(Table1[Customer]),[Sales],,DESC,Dense)
    var b =5 (As you want  top 5 you can make it dynamic also.... top N customers)
    return
    if(a<=b,1,0)
    And add it in visual level filter and set is not 0.
    This will give you top 5 Customers without creating any Column.
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you for your answer Anonymous.

      Will it gives me the "others" category?

      • Anonymous's avatar
        Anonymous
        Not applicable

        share your sample dataset.