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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors