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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
marijane
Helper I
Helper I

Show only the most popular products & Others on the legend of the chart

Hi, I have a chart that has too many products on the legend so I wanted to show only the products with the most sales and the rest named "others". Do you know how can achieve this? 
I build a table with product and sales and create this measure but I know that is wrong because the TOPN is a table and not a column but I don't know how to fix it. Can you please help?

Product & Others = if.eager('Product & Others'[product] in {TOPN( 6,Product & Others'[product]
        ,[sales],DESC)},
        ''Product & Others'[product],"Others")

Product & Others: 
product sales
A100
B200
C400
D50
E74
F300
G56
H53
I21
J80
K150
1 REPLY 1
amitchandak
Super User
Super User

@marijane , refer topn with others

Power BI- TOPN with Others- https://youtu.be/I_TY4hVlzAE

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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