Professional Documents
Culture Documents
Tableau Stacked Bar Chart 51
Tableau Stacked Bar Chart 51
For instance, if in a bar chart, one bar corresponds to the total sales done for
electronic items in the year 2019, then multiple segments within that bar can
show the number of total sales done for each brand like Sony, Dell, Asus, etc.
Thus, we can carry out a detailed analysis and comparison of sales made in the
year 2019 as a whole and see the contribution made by each brand.
You can take a maximum of one dimension field or category axis in a stacked
bar chart and up to two measure fields, that is, numerical axes.
Then we select the stacked bar chart option from the visualization pane
present on the right. This creates a simple vertical bar chart with years on its x-
axis and sales on the y-axis.
STEP 2: Add Region Dimension into the Column Section
Now, we add one more detail to our chart that is, Region dimension into
the Columns section. This adds four sections or columns for four regions. Each
column now has a set of four bars each pertaining to a year.
This divides each bar into small colored sections pertaining to different
brands. Thus, what we have now is a stacked bar chart where each bar
represents a year and whose height is proportional to the total sales done in
that year as a whole.
Also, each bar is divided into small colored sections which represent the total
sales done in that year for each brand of electronic items. When you put your
cursor on any colored section it will show details like Region, Sub-category,
that is, the brand name, Year and total sales value for that brand in that year.