Mastering Tableau: Step-by-Step Guide to Create Stacked Bar Charts

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, with each part contributing to the total. Let's dive into the step-by-step process of creating a stacked bar chart in Tableau.

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

Before we begin, ensure you have your data source connected to Tableau and you're familiar with the basic interface. If not, Tableau's official tutorials are an excellent starting point.

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 prepare your data correctly. For a stacked bar chart, you'll need at least two dimensions (categories) and one measure (value). Dimensions are the categories you want to compare, while the measure is the value you're comparing.

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

For example, if you're creating a stacked bar chart to show sales by region and product category, your dimensions would be 'Region' and 'Product Category', and your measure would be 'Sales'.

Ensuring Your Data is Pivot-Ready

Bar Charts | AnyChart Gallery
Bar Charts | AnyChart Gallery

Tableau needs your data to be in a specific format to create certain chart types. For a stacked bar chart, your data should be in a 'pivot-ready' format. This means your dimensions should be in columns, and your measures should be in rows.

If your data is not in this format, you can convert it using Tableau's 'Pivot' function. Select the data you want to pivot, right-click, and select 'Pivot'. Then, choose whether you want to pivot rows to columns or columns to rows.

Creating Calculated Fields (If Needed)

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

Sometimes, you might need to create calculated fields to get the data you want. For instance, if you want to show the percentage of total sales for each category, you can create a calculated field to do this.

To create a calculated field, right-click in the 'Data' pane, select 'Create Calculated Field', give it a name, and then enter the formula. For the percentage of total sales, the formula would be something like `SUM([Sales]) / SUM([Total Sales])`.

Creating the Stacked Bar Chart

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

Now that your data is prepared, it's time to create your stacked bar chart.

Drag your dimensions onto the 'Columns' shelf and your measure onto the 'Rows' shelf. Tableau will automatically create a bar chart. However, it's not stacked yet.

the most popular social media platforms
the most popular social media platforms
Stacked Bar Chart Maker – 120+ stunning chart types
Stacked Bar Chart Maker – 120+ stunning chart types
the bar chart menu is filled with information
the bar chart menu is filled with information
the top 10 visual bar chart designs
the top 10 visual bar chart designs
How to Create a Marimekko Chart in Tableau
How to Create a Marimekko Chart in Tableau
How to Make a Diverging Bar Chart in Tableau
How to Make a Diverging Bar Chart in Tableau
Salesforce Help
Salesforce Help
Sorting Stacked Bars in Tableau
Sorting Stacked Bars in Tableau
Stacked Bar Chart Template for Organic vs Paid Traffic | Moqups
Stacked Bar Chart Template for Organic vs Paid Traffic | Moqups
the bar chart shows how many people are using their cell phones
the bar chart shows how many people are using their cell phones
Tableau Tip: 7 easy steps to create a combination chart with overlapping bars & a line
Tableau Tip: 7 easy steps to create a combination chart with overlapping bars & a line
Add Percentages to Excel Bar Chart
Add Percentages to Excel Bar Chart
an info sheet with green and white graphics on it, including graphs, pie chart, bar chart, and other items
an info sheet with green and white graphics on it, including graphs, pie chart, bar chart, and other items
Create a Column Chart to Display Variance with Different Colors
Create a Column Chart to Display Variance with Different Colors
How to Create a Radial Bar Chart in Excel - Easy Steps
How to Create a Radial Bar Chart in Excel - Easy Steps
Multiple Stacked Bar Chart Template | Data Visualization Spreadsheet | Comparison Dashboard Chart | Excel & Google Sheets |
Multiple Stacked Bar Chart Template | Data Visualization Spreadsheet | Comparison Dashboard Chart | Excel & Google Sheets |
Data Visualization Tips: Bar Charts
Data Visualization Tips: Bar Charts
how do i create a stacked bar chart in tableau
how do i create a stacked bar chart in tableau

Making the Chart Stacked

To make the chart stacked, right-click on the measure in the 'Rows' shelf and select 'Stack Mark'. Alternatively, you can drag the measure onto the 'Color' shelf to stack it that way.

Now, your chart should be stacked. Each category will be broken down into its constituent parts, with each part contributing to the total.

Customizing Your Chart

Tableau offers a wide range of customization options. You can change the chart title, axis titles, colors, and more. To do this, right-click on the chart and select 'Format'. Then, choose the aspect you want to change.

You can also add filters to your chart to allow users to interact with it. Drag a dimension onto the 'Filters' shelf to add a filter. Users can then select or deselect values to filter the chart.

Creating a stacked bar chart in Tableau is a powerful way to communicate complex data relationships. With a little practice, you'll be creating engaging and informative charts in no time. Happy data visualizing!