How to Make a Stacked Bar Chart in Tableau

Cody Schneider7 min read

A stacked bar chart is a go-to visualization for showing how a larger category is divided into smaller sub-categories. Instead of getting lost in a sea of numbers, you can instantly see the relationship between the parts and the whole. This guide will walk you through exactly how to build, customize, and interpret stacked bar charts in Tableau, step-by-step.

What is a Stacked Bar Chart?

Imagine a standard bar chart that shows total sales for different regions. Now, imagine that within each region's bar, you could see colored sections representing different product categories like "Furniture," "Office Supplies," and "Technology." That’s a stacked bar chart. It packs two levels of information into one clean visual: the total value represented by the full length of the bar, and the contribution of each sub-category represented by the segments within it.

This type of chart is incredibly useful when you need to answer questions like:

  • What are our total quarterly sales, and which product lines contributed most to each quarter?
  • How does user traffic from different channels (Organic, Paid, Direct) contribute to the monthly total?
  • What is the breakdown of our revenue by customer segment for each country we operate in?

Essentially, if you need to compare totals across different groups while also understanding the internal composition of each group, a stacked bar chart is one of your best options.

How to Create a Stacked Bar Chart in Tableau (Step-by-Step)

Let's build one from scratch. We’ll use the "Sample - Superstore" dataset that comes included with Tableau, so you can easily follow along. Our goal will be to visualize total Sales by Region, with each region's bar stacked by Category.

Step 1: Get Your Data Ready

First, open Tableau and connect to your data source. In the "Saved Data Sources" section on the left, select Sample - Superstore.

Once connected, Tableau will navigate you to a blank worksheet. On the left side, in the "Data" pane, you'll see your Dimensions (like Region and Category) and Measures (like Sales and Profit). This is all you need to start building.

Step 2: Build the Basic Bar Chart

We'll start by creating a simple bar chart. A stacked bar chart is just an extension of this.

  • Drag the Region dimension from the "Data" pane and drop it onto the Columns shelf at the top of the worksheet.
  • Drag the Sales measure and drop it onto the Rows shelf.

You should now see a standard vertical bar chart with four bars, one for each region (Central, East, South, West), showing the total sales for that region.

Step 3: Stack the Bars by Adding Color

This is where the magic happens. To "stack" these bars, we need to tell Tableau how to segment them. We do this by adding another dimension to the Color Mark.

  • Find the Category dimension in the "Data" pane.
  • Drag Category and drop it directly onto the Color card in the Marks pane (located to the left of your chart).

Instantly, your plain blue bars will transform. Each bar is now segmented into three colors, representing the sales from Furniture, Office Supplies, and Technology within that region. A color legend appears on the right so you know which color corresponds to which category. Just like that, you have a stacked bar chart!

Customizing Your Chart for Better Insights

A basic chart is good, but a well-formatted one is great. Good customization makes your chart easier to read and understand at a glance.

1. Add Data Labels

Putting numbers directly on the chart segments helps viewers understand precise values without having to estimate from the axis lines.

  • Drag the Sales measure from the "Data" pane onto the Label card in the Marks pane.

This adds the sales total for each colored segment directly onto the chart. For smaller segments where the labels overlap, Tableau will cleverly hide them to avoid clutter.

2. Adjusting Colors and Tooltips

The default colors are fine, but you may want to use brand colors or create higher contrast.

  • Colors: Click the Color card in the Marks pane, then select Edit Colors. From here, you can select from dozens of pre-made palettes or assign a specific color to each category.
  • Tooltips: A tooltip is the box of information that appears when you hover over a part of your chart. Tableau creates a default one, but you can customize it for more context. Click the Tooltip card and use the editor to add more fields, rephrase text, or change formatting. For example, you could add the Profit measure to the tooltip to see profitability for each segment on hover.

3. Sorting for Clarity

Sorting your data makes comparisons much easier. You can sort by the total value of each bar or by the values of the segments within the bars.

  • Sort Bars: To arrange the regions from highest to lowest sales, hover over the "Region" axis label until a small sort icon appears, and click it. You can also right-click the Region pill on the Columns shelf, click Sort, and define a more specific sort logic (e.g., sort descending by the sum of sales).
  • Sort Segments: You can even change the order the segments are stacked. Simply drag the categories within the color legend on the right into your desired order.

How to Make a 100% Stacked Bar Chart

Sometimes, you're less interested in the raw totals and more interested in the proportion of each sub-category. A 100% stacked bar chart normalizes every bar to a height of 100%, making it perfect for comparing the relative makeup of each group.

Step 1: Use a Quick Table Calculation

Start with the stacked bar chart we just built.

  • In the Rows shelf, right-click the SUM(Sales) pill.
  • Hover over Quick Table Calculation and select Percent of Total.

Your chart immediately transforms. The Y-axis now shows percentages, from 0% to 100%.

Step 2: Adjust the Calculation

There's one crucial final tweak. We need to make sure Tableau is calculating the "Percent of Total" for each bar individually (within each region), not across the entire dataset.

  • Right-click the SUM(Sales) pill on the Rows shelf again.
  • Select Edit Table Calculation.
  • In the pop-up window, under Compute Using, select Cell.

Now, each vertical bar accurately represents 100% of the sales for that specific region. It becomes very easy to see that while the West region has the highest total sales (in our first chart), the South region has the highest proportion of sales coming from the Technology category.

Best Practices and Common Mistakes

  • Avoid 'Segment Overload': A stacked bar chart works best with a handful of segments (generally 2-5). If you add too many, the chart becomes a 'rainbow,' making it impossible to distinguish between the smaller segments and interpret the data. If you have many sub-categories, consider grouping smaller ones into an "Other" category.
  • Keep Segment Order Consistent: Arrange the stacks in a logical and consistent order across all bars. Your audience will learn to 'read' the chart from bottom to top, so keeping the "Technology" segment on the bottom in every bar, for example, makes visual comparisons faster.
  • Don’t Compare Middle Segments: It’s easy to compare the bottom series of stacks because they all start from the same baseline (zero). It’s much harder to accurately compare middle or top segments because their baselines float. If pinpoint comparison of individual segments is your main goal, a grouped (or side-by-side) bar chart might be a better choice.

Final Thoughts

Creating a stacked bar chart in Tableau is a fundamental skill that allows you to bring more depth to your data stories. By moving from a simple bar chart to a stacked view, and even a 100% proportional view, you give your audience multiple ways to find meaningful patterns in the business. Once you get the hang of it, you'll see opportunities to use them everywhere.

Creating reports directly in tools like Tableau is powerful, but the process of connecting data, building visualizations, and then rebuilding them week after week can be time-consuming. We built Graphed to automate this friction away. You can connect all your sales and marketing sources - from Google Analytics to Salesforce to your social ad platforms - and generate dashboards instantly just by describing what you want to see in simple, natural language. We find it lets us skip the manual button-pushing and get straight to the insights.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.