Help with Grouped + Stacked Bar Graphs

Hello, I am trying to create a stacked bar graph that is grouped by facility.

Metric 1

Metric 2

Metric 3 = Metric 1 + Metric 2

Currently, this bar graph is being used.

I want to accomplish something like this for metrics by facility but for Metric 3 (which is composed of Metric 1 + Metric 2) and still show the Metric 1 and 2 as parts of it. Is this possible?

Answers

  • @Aaron_Zheng Have you considered the Nested Bar chart type?

  • @MichelleH Thank you for the rapid response! I just tried the Nested Bar type.

    It simply sums Metric 3 for all facilities. I need Metric 3 broken down if possible.

  • @Aaron_Zheng Are there additional metrics in addition to 1, 2, and 3? If not, you could just remove Metric 3 since the grey bar will show the sum of Metric 1 and Metric 2

  • @MichelleH The Nested Bar is only allowing 1 y-axis value. Currently, only using Metric 3.

    If I could use multiple y-values, I was hoping that it WOULD sum up Metric 1 and 2. Not sure how I would establish that relationship but….

    Left-most group of 4 with small black bars is what I am trying to do.

  • Hi @MichelleH !

    I wanted to follow up from over the weekend. Any updates on whether this is possible?

  • MichelleH
    MichelleH Coach
    edited July 2023

    @Aaron_Zheng What if you used an Overlay Bar Chart with a beast mode for each series/color?

    Assuming you are currently using a single Y axis value with a dimension in the chart series, you can actually break each color bar into its own beast mode field. For example, the blue bar could be something like this:

    sum(case when `Dimension` = 'A' then `Value` else 0 end)
    

    If you repeat this for each color in your existing chart then you are no longer limited to a single Y-Axis field. Then each field can have its own color rule applied to it.