Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
A_Barny
Frequent Visitor

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 :

 

pie chart.PNG

 

Can you help me to understand it and fix it ?

 

Thanks a lot,

Alex

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

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])

3.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

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])

3.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

Do you have some sample data you can share? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I added modifications on the first post

Anyone have idea ? Smiley Mad

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.