Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi Experts,
i want to create a bar and pie chart based on Customer table.Distinctcount(customerid) is 500, customer type is B and S. suppose my B is 200 and S is 300. adding both is KPI,but in my pie chart showing B is 200 and S is 500, please help me to resolve it

sounds like you have customers who are in both group types?
you will need to check your data
Proud to be a Super User!
There is a difference if he buys a project then B , but if he buys nothing then S
s
ok but if you do a distinctcount(customerid) and put the type on the slicer then it should be 200+300 so there must be something else going on with the data otherwise it wouldn't be 500? can you view it in the matrix or in the source data to see how many unique customers are against each type. or share the data so we can get a better understanding.
what are you calculations?
Proud to be a Super User!
Apologies, i put the querstion in wrongly.
Total 300 entered the shop, i, entrance CCTV all member data was captured (300), then in cash counters CCTV 200 image captured. in my device table i have devicename for Entrance CCTV which is AA and in Cash counter CCTV is BB.
my table : - 1:M joins my device(device_ids), trans(device_ids), under trans table i have cid's.
If a person image captures in both location CCTV he is B else S, when i do distinctcount(cid's.) by device type my result is B=200 and S=300 but i want my S=100.
hope you understand my queries
So you can do S minus B ? = 100
how to write measure for that.
i need to create multiple pie chart , CCTV also check the gender F/M,
1 chart for Type B/A
2 chart for F/M
are you able to provide some sample data
are there customer ids that have 2 rows, ie both AA and BB?
Proud to be a Super User!
yes, cutomers have 2 rows if they are B else 1
because you have more than one row i suggest you summarize the table and then create the type off of that table
ie.
SUMMARIZE(table , customerid, "derived customer type", max(type))
then you create the new column off this table as it gives one row per customer and if you use max it will return when there is b
Proud to be a Super User!
tried it not working😓
Well i do not know your data structure so it would be a quess. But something like this:
distinctcount(cid's.)
CALCULATE(distinctcount(cid's.);customertype = S) - CALCULATE(distinctcount(cid's.);customertype = B)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.