Mastering Tableau: Step-by-Step Guide to Create Stacked Bars

Mississauga Jul 01, 2026

Creating a stacked bar chart in Tableau is a powerful way to compare and contrast data across different categories. This visualization technique allows you to overlay bars of different series on top of each other, making it easier to see the composition of your data. Let's dive into the step-by-step process of creating a stacked bar chart in Tableau.

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

Before we begin, ensure you have your data source connected to Tableau and that you're familiar with the basic interface. We'll assume you're working with a dataset that has at least two dimensions (e.g., Category, Sub-Category) and one measure (e.g., Sales).

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

Preparing Your Data

Before creating your stacked bar chart, it's crucial to ensure your data is in the correct format. In most cases, you'll want to have your data in a 'wide' format, where each category has its own column for the measure you're interested in. For example:

How to Make a Polygon Scatter Plot in Tableau
How to Make a Polygon Scatter Plot in Tableau
CategorySub-CategorySales (Total)Sales (Profit)
ElectronicsLaptops5000015000
ElectronicsSmartphones7000020000

If your data is in a 'long' format, you can pivot it to wide format using Tableau's 'Pivot' function under the 'Analyze' menu.

How to Create a 100% Stacked Bar Chart with Totals in Excel?
How to Create a 100% Stacked Bar Chart with Totals in Excel?

Creating the Stacked Bar Chart

Once your data is prepared, you're ready to create your stacked bar chart. Here's how:

  1. Drag and drop your Category dimension onto the Columns shelf.
  2. Drag and drop your Sub-Category dimension onto the Rows shelf.
  3. Drag and drop your 'Sales (Total)' measure onto the Columns shelf again. This will create a bar chart.
  4. Right-click on the 'Sales (Total)' pill on the Columns shelf and select 'Duplicate'. This will create a copy of the measure.
  5. Rename the duplicated measure to 'Sales (Profit)'.
  6. Right-click on the 'Sales (Profit)' pill and select 'Stack Mark'. This will turn your bar chart into a stacked bar chart.
Bar Charts | AnyChart Gallery
Bar Charts | AnyChart Gallery

Customizing Your Stacked Bar Chart

Tableau offers numerous ways to customize your stacked bar chart to better fit your needs:

  • Sorting: Right-click on a dimension pill and select 'Sort' to sort your bars in ascending or descending order.
  • Color: Right-click on a measure pill and select 'Color' to change the color of each series in your stacked bar chart.
  • Tooltips: Right-click on a measure pill and select 'Format' to customize the tooltip that appears when you hover over a bar.
the top 10 visual bar chart designs
the top 10 visual bar chart designs

Interpreting Your Stacked Bar Chart

Stacked bar charts are powerful tools for understanding the composition of your data. They allow you to see how different categories contribute to the total, making it easier to identify trends and patterns.

How to Make a Diverging Bar Chart in Tableau
How to Make a Diverging Bar Chart in Tableau
Stacked Bar Chart Maker – 120+ stunning chart types
Stacked Bar Chart Maker – 120+ stunning chart types
Exploded Bar Chart
Exploded Bar Chart
the bar chart menu is filled with information
the bar chart menu is filled with information
Visualizing Survey Data - Data Revelations
Visualizing Survey Data - Data Revelations
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
a bar chart that shows the number of traffic channels in each country, as well as percentage
a bar chart that shows the number of traffic channels in each country, as well as percentage
the chart shows how customers use their platforms
the chart shows how customers use their platforms
the number of people who are in each country
the number of people who are in each country
a bar chart showing the number of people in different countries
a bar chart showing the number of people in different countries
a bar chart showing the number of people who have died in bed since 2009 to 2013
a bar chart showing the number of people who have died in bed since 2009 to 2013
Guns, Gantt Bars, and Divergent Stacked Bar Charts - Data Revelations
Guns, Gantt Bars, and Divergent Stacked Bar Charts - Data Revelations
an info sheet with different types of graphics
an info sheet with different types of graphics
an info board with various graphs and numbers on the front, purple lights in the back
an info board with various graphs and numbers on the front, purple lights in the back
the bar chart shows that there are many different types of items in this screen shot
the bar chart shows that there are many different types of items in this screen shot
Stacked Bar Chart Alternatives - Peltier Tech
Stacked Bar Chart Alternatives - Peltier Tech
10+ ways to make Excel Variance Reports and Charts - How To - PakAccountants.com
10+ ways to make Excel Variance Reports and Charts - How To - PakAccountants.com
I will create interactive and beautiful tableau and power bi dashboards
I will create interactive and beautiful tableau and power bi dashboards
Statistic infographic chart design template set for dark theme. Representing quantity. V
Statistic infographic chart design template set for dark theme. Representing quantity. V
Stacked Bar Chart Template Excel & Google Sheets: Visualize Sales, Categories and Totals
Stacked Bar Chart Template Excel & Google Sheets: Visualize Sales, Categories and Totals

For example, in our sales data, a stacked bar chart allows us to see the proportion of total sales that come from profit, making it easy to identify which categories are most profitable.

Common Pitfalls and Best Practices

While stacked bar charts are powerful, they can also be misleading if not used correctly. Here are some best practices to keep in mind:

  • Avoid too many series: Too many series in a stacked bar chart can make it difficult to read. Try to limit the number of series to 5 or fewer.
  • Use a reference line: Adding a reference line can help put your data into context. For example, you might add a line representing the average sales.
  • Consider a 100% stacked bar chart: A 100% stacked bar chart shows the proportion of the total for each category, making it easier to compare categories directly.

Creating a stacked bar chart in Tableau is a straightforward process that can greatly enhance your data visualization skills. With a little practice, you'll be creating insightful and engaging stacked bar charts in no time. Happy data visualizing!