Forum Discussion

trev_likes_PBI's avatar
trev_likes_PBI
Regular Visitor
9 years ago
Solved

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?

 

 

  • 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

36 Replies

  • v-huizhn-msft's avatar
    v-huizhn-msft
    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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous ,

       

      Interesting solution.  Thanks for sharing

       

      Cheers

       

      CheenuSing

    • Anonymous's avatar
      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?

    • feelie75's avatar
      feelie75
      Helper I

      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.

  • Anonymous's avatar
    Anonymous
    Not applicable

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

  • ankitpatira's avatar
    ankitpatira
    Community Champion

    trev_likes_PBI I think in power bi using standard stacked column chart you won't be able to split out two columns but it will have different colours for each category of your legend. Something like below.

     

    • trev_likes_PBI's avatar
      trev_likes_PBI
      Regular Visitor

      Thank you ankitpatira. However, a stacked column is not sufficient for what we are trying to implement. 

      • chbraun's avatar
        chbraun
        Helper I

        You might want to think about using small multiples, i.e. splitting up the one chart into four small bar charts, one for each country.

         

        If the data isn't too complex small small multiples in general work great to bring out differences among categories. 

  • 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.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