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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
floralau
New Member

doughnut chart: top 3

What I have now is a doughnut chart with mainly two colors(i.e red and blue) and more than 10 values. and i would like to show the top 3 values of each color. or either to only show top 3 value's label.

 

Thank you!!

1 ACCEPTED SOLUTION
PC2790
Community Champion
Community Champion

See if this helps:

Measureabcd =
SUMX (
    TOPN (
        3,
        SUMMARIZE (
            ChannelTable,
            ChannelTable[Channel],
            "abcd", COUNT ( ChannelTable[Channel] )
        ),
        [abcd], DESC
    ),
    COUNT ( ChannelTable[Channel] )
)

PC2790_0-1650974073980.png

PC2790_1-1650974090143.png

 

View solution in original post

6 REPLIES 6
PC2790
Community Champion
Community Champion

You would need to create a meausre to get the top three values and then use that measure in the "Values" section of Donut chart.

You can use TOPN to get the top three values

TOPN function (DAX) - DAX | Microsoft Docs

Sorry, still a bit confused. 

testing2 = TOPN(3,'Succesful Rate', 'Succesful Rate'[Channel])
"Channel" include many things (e.g aaa, bbb, bbb, ccc)
 
May i ask what's wring with it?
PC2790
Community Champion
Community Champion

on what criteria you are basing your top three value?

I can give you an example, suppose I want the top three based on the sum of the amounts across each country. I'll use:

Top3 = sumx(TOPN(3,SUMMARIZE(CCY,CCY[CY],"abcd",SUM(CCY[Amount_in_USD])),[abcd],DESC),[abcd])

You can try to mould it according to your requirement.Or provide with more details on the dataset so that we cna help you with it

My [Channel] column is somethings like "aaa","aaa","bbb","ccc""ccc", "ddd","ddd","ddd","eee".

I would like to count them, and rank by the number of appearances.

 

Thank a lot for answering!

PC2790
Community Champion
Community Champion

See if this helps:

Measureabcd =
SUMX (
    TOPN (
        3,
        SUMMARIZE (
            ChannelTable,
            ChannelTable[Channel],
            "abcd", COUNT ( ChannelTable[Channel] )
        ),
        [abcd], DESC
    ),
    COUNT ( ChannelTable[Channel] )
)

PC2790_0-1650974073980.png

PC2790_1-1650974090143.png

 

Thanks so much for helping!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.