Select to view content in your preferred language

Stacked Bar Chart with Multiple Numeric Fields

2035
5
07-01-2021 01:36 PM
Status: Open
DerekRichards
Emerging Contributor

Ability to create a stacked bar chart with one string field and two numeric fields. I have a couple of different monetary fields (for simplicity let's say income and expenses) that I want to stack by city, but can't because for some reason the stacked bar chart is only for two string fields or two string fields and a numeric field. 

5 Comments
AkshayHarshe

Hi Derek,

I think the Combo chart in this case might make the most sense. You can also use a Tree map or point chart to represent these 2 Numeric Fields and one String.

Though it is good to have multiple numeric fields in a stacked bar or column. If you have an example visualization will you be able to post it to this thread? 

Thanks,

Akshay 

DerekRichards

Hello Akshay.

Below is the chart I want to make (I took out the values and labels to protect the data). The red and green represent two different numeric columns of data with each bar representing a city. 

Stackedbar1.JPG

Below is the combo chart I could make in Insights, I just think the chart would be better and cleaner if I could stack the two numeric fields. 

stackedbar2.JPG

AkshayHarshe

Hi Derek, 

The closest you can do is to add 1 numeric field as a line and one as a bar.

In the first screenshot of the Stacked one that you posted what are the units on the X or Y axes? (One of them will represent the string category). Meaning, are the Red and Green bars are rendering percentages that are represented from 0-100 on an axis or they are representing unit increments for Sum of Red+Green?

Thanks,

Akshay

DerekRichards

@AkshayHarshe :

y-axis are cities (string category)

x-axis are two different monetary values (numeric values from two different table columns) with the axis labels being set off the green bars since they are larger. There are no percentages or summing being done.

AkshayHarshe

@DerekRichards Thanks for sharing that information. This sounds like a reasonable enhancement. I will give it a thought and present it to our leads to see where does this fits.