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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
saivina2920
Post Prodigy
Post Prodigy

Pie chart count and its percentage showing wrongly

I am design pie chart using some sample data. I am not getting the exact result and it's percentage in pie chart.

I have two different category and trying to get match and mismatch of the records.

The logic i have derived in sheet2 of the attched excel sheet.

The all data get reflect based on the category selection.

I have attached the sample pbix file and sample data in the drive.

 

sample file : https://1drv.ms/u/s!AiSRcgO5FUmN8Wl5yLk3-4kXLzeP?e=TlShfY 

11 REPLIES 11
v-henryk-mstf
Community Support
Community Support

Hi @saivina2920 ,

 

Try the measure like below:

Res1 = 
IF (
    MAX ( 'TEST DATA'[COUNTRY-A] ) <> "NOT APPLICABLE"
        && MAX ( 'TEST DATA'[COUNTRY-B] ) <> "NOT APPLICABLE"
        && MAX ( 'TEST DATA'[COUNTRY-C] ) <> "NOT APPLICABLE",
    1,
    0
)
Total =
CALCULATE (
    COUNTROWS ( 'TEST DATA' ),
    FILTER (
        ALL ( 'TEST DATA' ),
        'TEST DATA'[CATEGORY] = MAX ( 'TEST DATA'[CATEGORY] )
            && 'TEST DATA'[Res1] = 1
    )
)

vhenrykmstf_0-1650606726293.png

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

Hi @v-henryk-mstf ,

I have mentioned the detail explanation and sample screenshot for your reference.

can you pls. verify and update for the same...?

It is very long pending and want to close this ASAP....

Thanks for your guidance.
We have to add some more condition as mentioned below.
For Selecting Category==> Type-A the below is the logic

When selecting TYPE-A, the total filter record is "5" and it is 100%. ==> this is perfect in pie chart

PieChart-1
----------
This 100% and value "5" can be splitted in the below partition

1. Match ==> Get the row count if Column "VALUE" is blank ==> "2" Row (40%) will come
2. UnMatch ==> Get the row count if column "VALUE" in Non Blank ==> "3" Row (60%) will come
3. Others ==> Get the row count if nothing will match

Note : "Others" will not come here. because, match and unmatch occupying 100%

Now, the pie chart should display both Match and Unmatch record with the above two conditions

PieChart-2
----------
This 100% and value "5" can be splitted in the below partition

1. Match ==> Get the row count if Column "CODE" and "VALUE" both is blank ==> "1" Row (20%) will come
2. UnMatch ==> Get the row count if column "CODE" and "VALUE" in Non Blank ==> "2" Row (40%) will come
3. Others ==> Get the row count if nothing will match ==> "2" Row (40%) will come

Now, the pie chart should display both Match and Unmatch record with the above two conditions

pls. let me know if you need any more details

Hi @saivina2920 ,

 

Your presentation is a bit complicated, is it possible to provide screenshots of the desired results.


Best Regards,
Henry

 

can you pls. have a look and give us the feedback..

Can you please reply the last queries.. pls.let me know if you want any more details...

Sorry.

I derived some DAX for the Match and UnMatch as mnetioned below. pls. guide me this is correct or not. anyhow the output is coming perferct.

Match =
Var A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
&& 'TEST DATA'[VALUE] = BLANK())
))
RETURN A + 0

UnMatch =
Var B = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
&& 'TEST DATA'[VALUE] <> Blank())
))
RETURN B + 0
 
and the result is
saivina2920_0-1650622118095.png

 


 

But, i want to create DAX measure for Piechart-2 (for others) and the condition should be below.

 

PieChart-2
----------
This 100% and value "5" can be splitted in the below partition

1. Match ==> Get the row count if Column "CODE" and "VALUE" both is blank ==> "1" Row (20%) will come
2. UnMatch ==> Get the row count if column "CODE" and "VALUE" in Non Blank ==> "2" Row (40%) will come
3. Others ==> Get the row count if nothing will match ==> "2" Row (40%) will come

 

How to make 3rd condition for "Others"

 

pls. refer the test file : https://1drv.ms/u/s!AiSRcgO5FUmN8W58WBnMK43kZj9u?e=lCL7Xb 

 

saivina2920
Post Prodigy
Post Prodigy

Can anyone give idea to solve this problem...?

saivina2920
Post Prodigy
Post Prodigy

pls. give us some idea to clear this issue. This is urgent..

saivina2920
Post Prodigy
Post Prodigy

Pls. Reply. This is very very urgent...

saivina2920
Post Prodigy
Post Prodigy

Pls. anyone can correct the missing DAX expression..This is very very urgent.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.