Forum Discussion

A_Barny's avatar
A_Barny
Frequent Visitor
8 years ago
Solved

Top 10 does not work correctly

Hi everyone,

 

I have a problem on my mesure and I don't know why. I try to do a TOP10 of YTD quantity by Customers.  I want the TOP 9 Customers and the last will be the "Others" customers.

 

 

For do that, I did 2 mesures :

 

 

Mesure = RANKX(ALL('A - Dimensions'[Customer DO - ABC]);'D - YTD Measures'[YTD Qty])

and 

 

 

top 10 = IF('A - Dimensions'[Mesure]<10; 'A - Dimensions'[Customer DO - ABC] ;"Top Others")

When I try validate my last mesures my computer crash because this resquest need to do many calculate but I don't understand why.

 

Exemple of Data :

 

CustomersYTD QtyMesure TOP 10
Customers 33991 1
Customers 53892 2
Customers 13503 3
Customers 22604 4
Customers 42345 5
Customers 102226 6
Customers 152007 7
Customers 121578 8
Customers 101569 -->9
Customers 614810 Others
Customers 810011 Others
Customers 139912 Others
Customers 94913 Others
Customers 142914 Others
Customers 11215 Others

 

This is what I try to do with the name of others customers too :

 

 

Can you help me to understand it and fix it ?

 

Thanks a lot,

Alex

 

  • Anonymous's avatar
    Anonymous
    8 years ago

    HI A_Barny,

     

    You can add new calculate to replace top 10 values, then use new column as category.

    Category = IF([TOP 10]<>"Others",[Customers],[TOP 10])

     

    Regards,

    Xiaoxin Sheng

4 Replies