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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mic_rysel
Frequent Visitor

how to merge categories as "others" with TOP

Hi, i have a problem with my pie chart. My fact table,  Sales has values:

Product OrderDate  SaleValue

 

Prod1 2020-04-05   45

prod2 2020-04-01 90

prod3 2019-02-14 20

prod2 2019-02-10 90

prod1 2018-10-10 10

prod4 2002-01-05 9

 

I need to create a pie with top 2 categories by salevalue and 3 category  as others

pie categories;

prod 2 - 180

prod 1- 55

others (as prod3, prod4) - 29

thanks for help!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

3 REPLIES 3
Greg_Deckler
Super User
Super User

Seems like you need to do a RankX as a measure and use that in a Group


Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

https://blog.gbrueckl.at/2019/05/power-bi-dynamic-topn-others-with-drill-down/

Warning: this is not easy but it's the only way.

Best
D

it seems as good solution byc it doesnt work with my measure, could You help me? For ranking I create measure like this;

SOS AM =
DIVIDE(
calculate(sum(SaleValue);MONTH(vfact_Points_Details[Date]) = MONTH(TODAY()))
;
CALCULATE(sum(SaleValue);MONTH(vfact_Points_Details[Date]) = MONTH(TODAY());ALL(vfact_Points_Details[Name]))
)

 

I need ratio  percentage sum(SaleValue) to sum(SaleValue) all products
And then do pie chart with product and SOS AM (top)

If i do like in Your article I got 100% for every products without others 😞

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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