Can I make a grouped bar chart with 2 series/categories?

Options

Hello! I am currently trying to make a grouped bar chart that is also stacked. In this scenario I want to compare our power and core members and within those groups how many of each are a website client with us. If they are a website client, I want that bar to be stacked to show what type of website that member has.

This is what I get when I do a simple group chart and use Website Client (True/False) as the series. If I change the chart type to "Grouped + Stacked" I get one series field option so I just dropped the Website Type over the top of the Website Client field and got this:

This looks how I want the chart to look except the values completely changed. For reference, 186 on the top picture now says 100 on the bottom. Is this an impossible task or is there possibly a better way to do it?

Thanks in advance!

Tagged:

Best Answers

  • ColemenWilson
    Answer ✓
    Options

    This is possible using the Grouped and stacked vertical bar chart type. The default for the chart is to have the first of the series as a bar to the left (the blue bar in your example) with the rest in the series stacked to the right of it. So this chart type will produce what you are looking for but will require you doing some ETL work to format the data properly. You'll need a field to distinguish between Core and Power which I think you already have. You'll also need to order your data so that non-website clients are in a grouping that is labeled to come first in ascending order. Something like this:

    Note that when the grouping is sorted in ascending order the Non-client will be first, making it the left bar with the remaining values being stacked to the right.

    If I solved your problem, please select "yes" above

  • ColemenWilson
    Answer ✓
    Options

    Formula for Series Grouping field:

    CASE WHEN `whatever your field is called` = 'whatever the name is of non-clients' THEN 'a. Non-client' ELSE `whatever your field is called` END

    If I solved your problem, please select "yes" above

Answers

  • ColemenWilson
    Answer ✓
    Options

    This is possible using the Grouped and stacked vertical bar chart type. The default for the chart is to have the first of the series as a bar to the left (the blue bar in your example) with the rest in the series stacked to the right of it. So this chart type will produce what you are looking for but will require you doing some ETL work to format the data properly. You'll need a field to distinguish between Core and Power which I think you already have. You'll also need to order your data so that non-website clients are in a grouping that is labeled to come first in ascending order. Something like this:

    Note that when the grouping is sorted in ascending order the Non-client will be first, making it the left bar with the remaining values being stacked to the right.

    If I solved your problem, please select "yes" above

  • deona720
    Options

    @colemenwilson That helps a lot, thank you! Do you know what that formula looks like? I am getting caught up on making a calculation for that. I am hoping I can add this as a column to a list view.

  • ColemenWilson
    Answer ✓
    Options

    Formula for Series Grouping field:

    CASE WHEN `whatever your field is called` = 'whatever the name is of non-clients' THEN 'a. Non-client' ELSE `whatever your field is called` END

    If I solved your problem, please select "yes" above

  • deona720
    Options

    @colemenwilson You rock, I was able to successfully make it. Thank you for your help!!