How to Create a Stacked Bar Chart in Tableau

Mississauga Jul 01, 2026

Creating a stacked bar chart in Tableau is a powerful way to compare and contrast data across different categories. This type of chart is particularly useful when you want to show the composition of a whole from its parts. Let's dive into the step-by-step process of making a stacked bar chart in Tableau.

Tableau Tip Tuesday: How to Label the Top of Stacked Bars
Tableau Tip Tuesday: How to Label the Top of Stacked Bars

Before we begin, ensure you have your data source connected to Tableau and that you're familiar with its structure. For this guide, we'll assume you have a dataset with at least two dimensions (e.g., Category, Sub-Category) and one measure (e.g., Sales).

Tableau tip: How to sort stacked bars by multiple dimensions
Tableau tip: How to sort stacked bars by multiple dimensions

Preparing Your Data

Before creating your chart, it's crucial to ensure your data is in the correct format. For a stacked bar chart, you'll typically want your data to be in a 'wide' format, where each row represents a category and each column represents a sub-category or part of the whole.

the bar chart shows how much people are spending
the bar chart shows how much people are spending

For instance, if you're analyzing sales by region and product type, your data should have columns for each region (e.g., East, West, North, South) and a row for each product type. If your data is currently in a 'long' format, you can use Tableau's 'Pivot' function to transform it.

Creating the Stacked Bar Chart

Tableau Stacked Bar Chart - Handle your data in tableau style
Tableau Stacked Bar Chart - Handle your data in tableau style

Once your data is prepared, it's time to create your stacked bar chart. Here's how:

Step 1: Drag and Drop

In Tableau, you can create a chart by simply dragging and dropping fields from the 'Data' pane onto the 'Columns', 'Rows', and 'Marks' shelves. To start, drag your dimension for the category (e.g., Product Type) onto the 'Columns' shelf and your dimension for the sub-category (e.g., Region) onto the 'Rows' shelf.

Bar Charts | AnyChart Gallery
Bar Charts | AnyChart Gallery

Next, drag your measure (e.g., Sales) onto the 'Marks' shelf. By default, Tableau will create a bar chart. However, it's not yet stacked, so we need to make a few adjustments.

Step 2: Dual Axis

To create a stacked bar chart, you'll need to use a dual axis. Right-click on the 'Sales' pill on the 'Marks' shelf and select 'Dual Axis'. This will create a second axis for your chart.

How to Create a Stacked Bar Chart Using Multiple Measures in Tableau
How to Create a Stacked Bar Chart Using Multiple Measures in Tableau

Now, you should see two identical bar charts on your worksheet. To ensure they're stacked, right-click on the second axis and select 'Synchronize Axis'. This will link the two axes together, allowing them to share the same scale.

Step 3: Stack the Bars

Stacked bar chart in Tableau
Stacked bar chart in Tableau
How to in Tableau in 5 mins: Build a Diverging Stacked Bar Chart
How to in Tableau in 5 mins: Build a Diverging Stacked Bar Chart
Improved Stacked Bar Charts with Tableau Set Actions - Canonicalized
Improved Stacked Bar Charts with Tableau Set Actions - Canonicalized
How to Create a 100% Stacked Bar Chart with Totals in Excel?
How to Create a 100% Stacked Bar Chart with Totals in Excel?
Stacked Bar Chart Maker – 120+ stunning chart types
Stacked Bar Chart Maker – 120+ stunning chart types
a large poster with many different colors and shapes on it's sides, including the words bar chart
a large poster with many different colors and shapes on it's sides, including the words bar chart
Side by Side  Bar Chart in #tableau  | Tableau #tutorial for beginners | Session 25 #data
Side by Side Bar Chart in #tableau | Tableau #tutorial for beginners | Session 25 #data
the top 10 visual bar chart designs
the top 10 visual bar chart designs
the bar chart menu is filled with information
the bar chart menu is filled with information
Exploded Bar Chart
Exploded Bar Chart
How to Make a Diverging Bar Chart in Tableau
How to Make a Diverging Bar Chart in Tableau
Stacked Bar Chart Alternatives - Peltier Tech
Stacked Bar Chart Alternatives - Peltier Tech
How to Make a Polygon Scatter Plot in Tableau
How to Make a Polygon Scatter Plot in Tableau
How to Create a Marimekko Chart in Tableau
How to Create a Marimekko Chart in Tableau
Bar Chart Templates
Bar Chart Templates
Tableau Bar Chart - Learn to Create 4 Variants of Bar Charts in Tableau
Tableau Bar Chart - Learn to Create 4 Variants of Bar Charts in Tableau
Sorting Stacked Bars in Tableau
Sorting Stacked Bars in Tableau
How to Visualize Sentiment and Inclination
How to Visualize Sentiment and Inclination
a bar chart showing the number of people in different countries
a bar chart showing the number of people in different countries
Stacked Bar Chart Alternatives - Peltier Tech
Stacked Bar Chart Alternatives - Peltier Tech

Finally, to stack the bars, right-click on one of the 'Sales' pills on the 'Marks' shelf and select 'Stack Mark'. This will combine the two bars into a single, stacked bar chart.

You can now customize your chart with titles, labels, and other formatting options to make it more visually appealing and informative.

Interpreting Your Stacked Bar Chart

Once your stacked bar chart is created, you can use it to compare and contrast your data. The height of each bar represents the total value for that category, while the color of each segment within the bar represents the proportion of that total made up by each sub-category.

For example, in a stacked bar chart showing sales by region and product type, you could quickly see which regions are performing well overall, as well as which product types are driving sales in each region.

Creating a stacked bar chart in Tableau is a straightforward process that can help you gain valuable insights from your data. With a little practice, you'll be able to create and interpret these charts with ease. Happy data visualizing!