Stacked Bar Chart in Tableau

The Tableau Stacked Bar Chart is useful to compare the data visually. In this article, we will show you how to Create a Stacked Bar Chart in Tableau with an example. For this Stacked bar chart example, we are going to use the Sample – Superstore Data Source.

Create a Stacked Bar Chart in Tableau Approach 1

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

Stacked Bar Chart in Tableau 2

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

Stacked Bar Chart in Tableau 3

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

Stacked Bar Chart in Tableau 4

Once you dropped the Segment field on to the Colors shelf, You can see the Stacked Bar Chart

Stacked Bar Chart in Tableau 5

Create a Stacked Bar Chart in Tableau Approach 2

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

Stacked Bar Chart in Tableau 6

Now we have to change the Bar chart to Stacked Bar Chart using the Show Me option. Please expand the Show Me window and select the Stacked Bar Chart from it as shown below

Stacked Bar Chart in Tableau 7

Once you select the Stacked Bar Chart from Show Me window, Stacked Bar Chart will be displayed as shown in below screenshot

Stacked Bar Chart in Tableau 8

Add Data labels to Stacked Bar Chart

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

Stacked Bar Chart in Tableau 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 Measures region to Labels shelf

Stacked Bar Chart in Tableau 10

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

Stacked Bar Chart in Tableau 11