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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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