Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

Top 10 / Other

I have created a Power BI table which ranks the top 10 customers by sales.  What now I need to do is take all of the remaining customers and combine them into one customer named "Other" and post it a...
  • v-sihou-msft's avatar
    v-sihou-msft
    10 years ago

    Anonymous

     

    In this scenario, I think you can firstly create a calculated column for RANK:

     

     

    RANK=
    RANKX(ALL(Table), SUMX(Table, Table[Sales]))

    Then create a display name column based on this RANK column:

     

     

     

    DISPLAY_CUSTOMER=
    IF(Table[Rank]>10,"Other",Table[Customer])

    Now you just need to drag the DISPLAY_CUSTOMER column into your table visual, all the "Other"s will be aggregated.

     

    Regards,

     

     

  • jahida's avatar
    jahida
    10 years ago

    v-sihou-msft I was thinking about that, the only reason that solution would not work is if the Top 10 needs to be dynamic ie. respond to filters. If filters don't really matter, then that solution is great.

  • OwenAuger's avatar
    OwenAuger
    10 years ago

    Here's a template for TopN & Other I've been playing with:

    https://www.dropbox.com/s/59cct4in6zqbxaj/Sales%20Top%20Other.pbix?dl=1

     

    The final measure is [Sales Amount Top & Other] which is displayed per Customer for Top Customers, otherwise just totalled.

    I also threw in a Rank measure.

     

    It might not fit everyone's requirements, but just another idea to throw into the mix ;)