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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
trev_likes_PBI
Regular Visitor

Clustered stacked column chart

I'm trying to implement a Clustered stacked column chart. I can't figure out how to do it or find any examples. 


The chart would look similar to the image below. Have you got any idea if this can be acieved in Power BI?

 

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

@trev_likes_PBI
In Power BI Desktop, it’s not possible to create a chart which can combine both Clustered and Stacked column chart together. Because it can’t determine which group of series need to be “clustered”, which group of series need to be “stacked”. And it’s still not supported to add multiple fields into Legend of a chart. The expected result as you posted can’t be achieved. For your requirement, I suggest you add a column to assign type “Forecast” and “Actual”, then build a hierarchy like “Type->Cost”. Put the hierarchy on X-axis, you suppose to drill down the detail level to see those different costs.

Best Regards,
Angelia

View solution in original post

36 REPLIES 36
Mayank_Yavda
Resolver II
Resolver II

Hi @trev_likes_PBI ,

 

Here, is a 100 % Stacked Clustered Column Chart where you can put two different values (e.g: Current year sales and Previous year sales) and can easily compare between them based on their category.

 

100 % Stacked Clustered Column Chart. pbivizedit.com100 % Stacked Clustered Column Chart. pbivizedit.com

 Download link for the custom visual file on this page,

https://pbivizedit.com/gallery/100stacked-clustered-column-chart 

 

This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,

  • anyone, irrespective of technical skills, can create their visuals
  • 15 minutes to create a visual from scratch
  • opens up many additional attributes to edit (e.g. labels, tooltips, legends position, etc)

Give this a shot and let us know if you face any problems/errors.
You can use the editor to modify your visual further (some modifications cannot be done in the Power BI window and have to be in the editor).

 

Thanks,
Team PBIVizEdit

I'm trying to use this tool and can't figure out how to add the clustering variable. How do you add a clustering variable?

Hi @Riv 

Instead of creating with the editor, now there is a direct download option available.
You can directly download the clustered stacked column chart from Appsource. There is a non-certified and a certified version.

https://appsource.microsoft.com/en-US/product/PowerBIVisuals/yavdaanalyticspvtltd1628223732998.clust...

https://appsource.microsoft.com/en-us/product/power-bi-visuals/yavdaanalyticspvtltd1628223732998.clu...


if you need a modification to the standard one and have to use the editor, then let us know and we can get you help.

Regards,
AsitM

Anonymous
Not applicable

I've put a solution together in this blog post if it's still interesting after all these years since this thread was posted 🙂

 

https://www.villezekeviking.com/how-to-combine-a-clustered-and-stacked-chart-in-power-bi/

This doesn't work for me, I just get identical stacked charts next to each other.

Anonymous
Not applicable

Hi, for the same, if multiple values are drilled down in x axis, for each of those parameters, how to show it in 2 stacked and one bar in clustered fashion like this, u have made it for single parameter.... any heads up?

This solution worked wonders for me, thank you! It did turn out the data structure of my source was similar to the one in your solution so it worked like a charm. But for other users out there, keep in mind you may need to tweak your data structure to make this work. Good luck!

Brilliant solution! I had a tinker with it for a while. my SQL was already extracting the year as a seperate column as a string, not a Date type. I'm not sure what I did but eventually it just worked somehow and I got a Clustered Stacked graph exactly how I wanted! You're the best!! hanks for sharing the pbix file on your blog as well.

Hi @Anonymous ,

 

Interesting solution.  Thanks for sharing

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
LN7715
New Member

Sorry to reply to an old post, but in case more people are looking for a solution - this tutorial shows how to simulate a clustered stacked chart https://youtu.be/AI3eT1kRje4

Anonymous
Not applicable

Is there any update on this feature we too need this functionality/workaround if any one has done it

v-huizhn-msft
Microsoft Employee
Microsoft Employee

@trev_likes_PBI
In Power BI Desktop, it’s not possible to create a chart which can combine both Clustered and Stacked column chart together. Because it can’t determine which group of series need to be “clustered”, which group of series need to be “stacked”. And it’s still not supported to add multiple fields into Legend of a chart. The expected result as you posted can’t be achieved. For your requirement, I suggest you add a column to assign type “Forecast” and “Actual”, then build a hierarchy like “Type->Cost”. Put the hierarchy on X-axis, you suppose to drill down the detail level to see those different costs.

Best Regards,
Angelia

This link effectively shows the steps of what you mention regarding the column for types and drilldown:
https://www.villezekeviking.com/how-to-combine-a-clustered-and-stacked-chart-in-power-bi/

 

There are paid visuals on appsource now (starting at $7 or so) that can get this done easily

Appsource - Clustered Stacked Column Chart

asitm_0-1669122990777.png

asitm_1-1669123028703.png

 



You have to structure your data like this example before using it in power BI.

 

https://www.quora.com/How-do-I-combine-bar-graphs-of-stacked-and-unstacked-columns-in-single-chart-i...

Hi Guys

I know there is no provision to create a clustered stacked column chart in PowerBI directly. But at times we have no option but to create the same to meet project demand. We have tried to tweak a little and build something which is close to clustered stacked column chart to meet our requirement. I am sharing the screen shot for same. We created it using black columns. In case you want to know more about solution, do ping me @ kamboj.rajan90@gmail.com

 

https://app.powerbi.com/view?r=eyJrIjoiNzcyZTEyZjItOTRhMS00NmMwLWI2ZDktZTE0NzI2YTczN2YyIiwidCI6IjI4N...

 

Thanks

Rajan Kamboj

 

Can you share the pbix to my email - srini@samiksha.com.sg

 

Appreciate your help

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

Unfortunately the solution suggested by @rajankamboj never came with a pbix.

The best offer came from @LN7715 with a video on Youtube showing a possible way forward.

 

I believe it's still an open request with the Power BI developers to give us an official solution.

Hi @rajankamboj  Can you please share the solution? Thank in Advance!

hi 

what was the solution ? i need to implement it as well in a file 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.