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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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!:
The Definitive Guide to Power Query (M)

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.