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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

help with stacked bar chart using counts

Hi

 

I am having some trouble creating a stacked bar chart. What I want here is  Three stacked bar for each category (a,b,c), which are currently represented as columns and they are each stacked according to a different category. LIke this and code below.

 

image007.png

 

https://www.dropbox.com/s/wifyfb2pyv77z0l/Sample%20Data%20-%20A.xlsx?dl=0

 

 

Thanks!

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Download this file: https://gofile.io/d/r7UAk2

 

output:

VahidDM_0-1639095841458.png

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

How are nulls in column A different from blanks in columns B and C - are they the same?  Also, do you only want to count the TRUE's in each column or TRUES's and FALSE's in each column?

Please clarify.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
VahidDM
Super User
Super User

Hi @Anonymous 

 

Download this file: https://gofile.io/d/r7UAk2

 

output:

VahidDM_0-1639095841458.png

 

 

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

Thanks for your repsonse. It worked with me. One more question, if my data source is an online database. would unpivot for columns still work with any new data this is added to this online database?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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