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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
wonderful
New Member

Create a chart from the Sum of columns

Analys.PNG

 

Have the table above and i would like to know how i can add up the sum of the "YES" and create a pie chart without the need of doing them separately.

 

for example

Pineaple =  3 yes

mango = 4 yes

orange = 2 yes

guava = 5 yes

peach = 6 yes

 

and draw a pie chart from that

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @wonderful

From your screenshot, the sum of the "YES" for each column should be 

2.png

To get this table, you need go to "Home"->"Edit Queries", then "Transform"->"Unpivot columns"->"Only selected ones"

3.png

Then "close &&apply", create a measure

Measure = CALCULATE(COUNT(Sheet1[Value]),FILTER(ALLEXCEPT(Sheet1,Sheet1[Attribute]),[Value]="Y"))

1.png

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @wonderful

From your screenshot, the sum of the "YES" for each column should be 

2.png

To get this table, you need go to "Home"->"Edit Queries", then "Transform"->"Unpivot columns"->"Only selected ones"

3.png

Then "close &&apply", create a measure

Measure = CALCULATE(COUNT(Sheet1[Value]),FILTER(ALLEXCEPT(Sheet1,Sheet1[Attribute]),[Value]="Y"))

1.png

 

Best Regards

Maggie

Hie @v-juanli-msft

 

I tried it and it is working perfectly, You are a life saver 🙂 Thank you for your help, I appreciate big timre.

 

Kindly Regards,

 

Wonderful

Helpful resources

Announcements
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 Kudoed Authors