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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
pkumar
Frequent Visitor

Top 5 and everything else other

Job Title.PNGJob Title Pie Chart.PNG

 

My pie chart shows the percentage of each job title based on count. I only want to show the top 5 though, and I want everything else to be show in something called "Other". I want this to be dynamic, meaning the top 5 could change if I uploaded new data.

1 ACCEPTED SOLUTION
Eric_Zhang
Microsoft Employee
Microsoft Employee

@pkumar

AFAIK, it is not supported in a visual setting, but you can create a calculated column as a workaround.

 

category_ =
IF (
    CONTAINS (
        TOPN (
            3,
            SUMMARIZE ( 'table', 'table'[category], "cnt"COUNTA ( 'table'[category] ) ),
            [cnt], DESC
        ),
        'table'[category], 'table'[category]
    ),
    'table'[category],
    "other"
)

Capture.PNG

View solution in original post

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee

@pkumar

AFAIK, it is not supported in a visual setting, but you can create a calculated column as a workaround.

 

category_ =
IF (
    CONTAINS (
        TOPN (
            3,
            SUMMARIZE ( 'table', 'table'[category], "cnt"COUNTA ( 'table'[category] ) ),
            [cnt], DESC
        ),
        'table'[category], 'table'[category]
    ),
    'table'[category],
    "other"
)

Capture.PNG

It worked! Thanks!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.