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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Donut chart counting wrong numbers of measures

 

Hi everyone, 

 

I am trying to display the D SKU count by liquid type in the bottom donut chart. 

 

In total, there should be 10 D SKUs (seen in the top donut chart). When I dragged the "Liquid Type" to the bottom chart, it was counting 11 D SKUs, does anyone have any insight on how to solve this? 

aprilysx_2-1663197837285.png

 

My formulas: 

 

ABCD = IF([Cumulative MACO %]<=0.8,"A",IF([Cumulative MACO %]<=0.95,"B",IF([Cumulative MACO %]<=0.995,"C","D")))
 
D SKU Count =
SUMX (
    DISTINCT ('Sheet1'[SKU]),
    ([ABCD]="D") * 1
)
 
Thanks!

 

 

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

Hi @Anonymous ,

 

According to your description, here is my solution.

Since you didn’t give sample data, I created a sample to restore your needs as much as possible.

vxiaosunmsft_0-1663232716439.pngvxiaosunmsft_1-1663232716448.png

Create a measure: (This is the same to your “ABCD” formula)

 

ABCD =
IF (
    MAX ( [Cumulative MACO %] ) <= 0.8,
    "A",
    IF (
        MAX ( [Cumulative MACO %] ) <= 0.95,
        "B",
        IF ( MAX ( [Cumulative MACO %] ) <= 0.995, "C", "D" )
    )
)

 

I think the problem is your definition of “A/B/C/D SKU Count”, here is my solution.

Create four measures:

 

A SKU Count =
COUNTROWS ( FILTER ( 'Table', [ABCD] = "A" ) )
B SKU Count =
COUNTROWS ( FILTER ( 'Table', [ABCD] = "B" ) )
C SKU Count =
COUNTROWS ( FILTER ( 'Table', [ABCD] = "C" ) )
D SKU Count =
COUNTROWS ( FILTER ( 'Table', [ABCD] = "D" ) )

 

Put “A/B/C/D SKU Count” into one Dount Chart, and then put “D SKU Count” and “Liquid Type” into another Dount Chart, you will get the expected result as below.

vxiaosunmsft_2-1663232817024.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi Xiaosun,

 

Thanks for your reply. 

 

Think your formulas would work well when the [Cumulative MACO %] column is in number format. 

 

However, the [Cumulative MACO %] column is in fact in measure format in my case. 

 

I have attached a link to the sample file, and not sure if you might have any insights on solving this? 

https://drive.google.com/file/d/1aGxIM8bj2EByFGgIu33u54PmmOiDK4kv/view?usp=sharing 

 

Thanks in advance!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors