cancel
Showing results for
Did you mean:

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

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
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
3 REPLIES 3
Super User
Seems like you need to do a RankX as a measure and use that in a Group

Become an expert!: Enterprise DNA
External Tools: MSHGQM
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
Frequent Visitor

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

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 😞

Announcements

#### New forum boards available in Real-Time Intelligence.

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

#### Power BI Monthly Update - May 2024

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

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors