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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Pie Char and Bar chart help

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

 
 

sb.JPG

11 REPLIES 11
vanessafvg
Super User
Super User

sounds like you have customers who are in both group types?

 

you will need to check your data 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

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?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

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

Anonymous
Not applicable

So you can do S minus B ? = 100

Anonymous
Not applicable

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?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

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





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

tried it not working😓

Anonymous
Not applicable

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)

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors