Tableau Stacked Bar Chart

Tableau has different bar charts that data analysts can use to create better visualizations. It works with all types of datasets, from complex to simple ones. Some of the common bar charts data scientists and specialists use to get the right visualizations. The stacked bar chart has more advantages than other charts due to its handling of data and variables. Professionals can use it to deal with real-time data and analyze it properly without facing many struggles. Currently, we have many users who use Tableau in their daily activities. The article will provide several ways you can create stacked bar charts and other fundamentals related to this type of bar chart.

What is Tableau Stacked Bar Chart?

The chart mainly shows values using segmented bars. The bars consist of different sections which handle the fields and the regions. The bars can handle smaller variable distribution. Most bar segments include variables like regions, profit, customers, brands, etc. All the values in the chart represent the field values normally in one axis.

We can create the main values and compare them with different values within the segment producing different insights. The chart supports one field, and it supports two fields when dealing with numerical axes. For example, when working on the number of sales data in a supermarket. You can come across laptop sales where you have to create a stacked bar chart that will indicate the sales of each laptop brand like HP, Lenovo, Acer, or MacBook in segments.

It makes the users understand the data better. It allows users to visualize data when dealing with data that has different categories in one visualization. It makes you fit many values and details into one graph.

We have the perfect professional Tableau Training for you. Enroll now!

How to Create a Stacked Bar Chart?

When you want to create a stacked bar chart, you follow the steps below. We shall look at how you can create the two types in Tableau.

You select the dimension you will work with. Input the dates under the column part, which you will use as a field value. We then go to the Measures category and drag your respective data, i.e., sales, under the rows section and use the SUM function as an aggregator. Navigate to the left side, locate the Stacked Bar Chart option and choose it. You will get a vertical bar with both the x and y axis representing your respectively labels.

How to Create a Stacked Bar Chart

Tableau Certification Training

  • Master Your Craft
  • Lifetime LMS & Faculty Access
  • 24/7 online expert support
  • Real-world & Project Based Learning

Under the part of the columns, you can add more details to create more sections. For example, when you deal with years, you will have around three of four regions, each representing a year.

Now that we have created bar charts, we need to change them into stacked bar charts. You also need to change the color card and create another subcategory under the colors card. Now we will have small sections with different colors to match the color of the brands found in the data. You will now have a stacked bar graph representing different data properties. When you take a cursor and hover it to a specific colored region, you will view all the information about a specific variable. For example, if the variable is laptops, you will get the price, the number of sales, year of manufacturing, category, etc.

created bar charts

Navigate to the Marks section and locate the Color card. Navigate to the Edit color option and choose the appropriate color for your stacked bar chart. Under the Assign Palette option, to have access to more color palettes. After selecting your colors, click the Ok button. You will now have the color of your choice.

 Stacked Bar Chart.

We now have to add more information to the charts by adding more labels under the Mark Labels, founder at the top of the toolbar. You can use it to add more labels. 

You can also use the drag and drop feature to move the label values from the Measures pane to the label shelf under the Marks Card. When working with a particular block, you can have it displayed under the Stacked Bar Chart.

You will have your stacked bar chart ready. If you want to add more features, you can visit the analytics pane, locate the reference lines, and drag them to the cell section. You can also use the SUM() aggregation, change the labels into values, change the formatting, and work with dialog boxes.

Want to know more about Tableau, Visit here Tableau Tutorial!

Types of Stacked Bar Chart

There are two types of stacked bar charts in Tableau. These types are:

Simple Stacked Bar Chart

The bar's value, together with the segment values, gets displayed in this category. When working with different data like amounts, you can use this chart as it allows you to work with different lengths.

Subscribe to our youtube channel to get new updates..!

100% Stacked Bar Graphs
It uses percentages when displaying in the graphs. It helps in making the differences between different values to be seen easily. All the bars use the same length.

Creating percent of the total on the stacked bar chart in tableau.
One needs to follow several steps when they want to get the percent of the total on a stacked bar chart in tableau. The steps that one has to follow include:

  • Upload your data source into the tableau and create a stacked bar chart. Use the SUM aggregation on several columns and change colors using the color card. 
  • Create several tables using columns and rows. 
  • Under your table, navigate to the label card, and under Quick Table Calculation, choose the Percent of Total option.
  • Navigate to the Analytics tab, choose between Reference or Average Line, and use the different features provided.
  • You can choose to remove one segment of the variable and then convert one of the remaining variables into a bar chart. Click on the Label option and choose the Text, Font, and Alignment to appear at the top of the menu. We will now use the dual axis option on the second variable to change the segment variables into a bar chart again. Make sure it works well with the axis. Click on the Edit Axis option and enable Dual Axis, Show header, and Synchronize Axis.

We can also use this method to create a percent of the total when dealing with a stacked bar graph. The steps include:

  • Create a new stacked ar again and use the SUM aggregation for the rows calculations.
  • There are scenarios where tables get generated automatically, and you can now access the labels. 
  • Under the analytics tab, use the reference line to change several settings like scope per cell, label, and click Ok.
  • Under the Reference Line, choose a line, and then under the Label, change to custom and input Tota:.
  • Click on the format under the reference line and change the fonts, line, alignment etc. You can also change the label fonts, alignment, and shading to help
  • you achieve your desired designs. When dealing with customization, you have to be careful not to miss any steps.

Top 40 frequently asked Tableau Interview Questions!

Advantages and Disadvantages of stacked bar charts in tableau

Some of the advantages of using a stacked bar chart include:

  • It is easier to understand. When working with stacked bar charts, you use different colors to make the variables which make the user understand the data well.
  • The stacked bar supports many variables under one chart, which makes it one of the best data visualizations you can use for comparison.
  • They have a good appearance due to their ability to make the variables use less space which makes everything clean.
  • It is a time saver. Interpreting data using stacked bar charts enables the user to interpret it quickly, saving time.

Disadvantages of using a stacked bar chart include:

  • Sometimes it's hard to read the bar chart. When adding more variables to the chart, it will be difficult for one to read and understand it.
  • Stack charts compared to other charts like pie charts are more error-prone compared to the rest.
  • It is complicated, making it hard for beginners to create or even understand the complexity.

Tableau Certification Training

Weekday / Weekend Batches


Many people who were wondering how to use stacked bar charts now know how to handle the situation. There is a lot of data collected across many platforms from databases, applications, and data analysts have to find better ways to improve business performance. It works well when dealing with multiple categories; many people use it in data analytics and intelligence. People also like it since it supports many variables under one customization.

Related Articles:

Find our upcoming Tableau Certification Training Online Classes

  • Batch starts on 26th Sep 2023, Weekday batch

  • Batch starts on 30th Sep 2023, Weekend batch

  • Batch starts on 4th Oct 2023, Weekday batch

Global Promotional Image


Request for more information

Research Analyst
As a senior Technical Content Writer for HKR Trainings, Gayathri has a good comprehension of the present technical innovations, which incorporates perspectives like Business Intelligence and Analytics. She conveys advanced technical ideas precisely and vividly, as conceivable to the target group, guaranteeing that the content is available to clients. She writes qualitative content in the field of Data Warehousing & ETL, Big Data Analytics, and ERP Tools. Connect me on LinkedIn.

Tableau Stacked Bar Chart FAQ'S

Navigate to the Row Shelf option. Locate SUM(Number of Records) and right-click on it. Under the  Quick Table Calculation, select the percent of the total option.

Tableau uses different features and functionalities to create a stacked bar chart. Most of the features are easy to follow and implement.

You drag the respective variables into the row shelves, navigate to the Show me tab, and choose Stacked bars.