Stacked Bar Chart in Tableau

The Tableau Stacked Bar Chart helps compare the data visually. This article will show you how to create it using the Sample – Superstore Data Source.

Create a Stacked Bar Chart in Tableau Approach 1

First, Drag and Drop Sales from Measures Region to Rows Shelf to create it. Since it is a Measure value, Sales will aggregate to default Sum. Once you drag them, Barplot will generate.

Select Bar Plot from Show Me window and added Sales to Rows Shelf 2

Next, Drag and Drop Sub-category from Dimension Region to Column Shelf. Once you drag them, a proper Tableau Barplot will generate, as we have shown below.

Add Dimension to Column Shelf of a Bar Plot 3

In this Tableau example, We want to Stack the Bar Chart by the Segments. So, we are dragging Segments from the Dimension region to the Color shelf in Marks Card.

Drag a Dimension to Color Shelf of a Bar 4

Once you drop the Segment field onto the Colors shelf, You can see the Stacked Bar Chart.

Stacked Bar Chart in Tableau 5

Create a Stacked Bar Chart Approach 2

Let me remove the Segment field from the Color Shelf, and place it right before the Sub-category in the Columns shelf.

Add Two dimension to columns and measure to rows 6

Now we have to change this to Stacked Bar Chart using the Show Me option. Please expand the Show Me window and select the below-shown plot from the show me.

Open Show Me window 7

Once you select it from the Show Me window, the Stacked Bar Chart will display, as shown in the below screenshot.

Stacked Bar Chart in Tableau 8

Add Data labels

To add data labels to Tableau Stacked Bar chart, click the Show Mark Labels button in the Toolbar.

Click T or show mark label button 9

Or drag and Drop the data Label value from Dimension or Measures Pane to Label shelf in Marks Card. In this example, We want to display the Sales as Data labels. So, Drag and Drop the Sales from the Measures region to the Labels shelf.

Add Sales Measures to Label T 10

Selecting or highlighting any specific block will show you the information at that particular point.

Stacked Bar Chart in Tableau 11