Skip to content Skip to sidebar Skip to footer

Tableau Show Grand Total On Stacked Bar Chart

Tableau Show Grand Total On Stacked Bar Chart

Introduction

Tableau is a powerful data visualization tool that helps users to analyze and visualize data in an interactive and meaningful way. Stacked bar charts are a popular type of chart used in Tableau to display the composition of a categorical variable over time or across different categories. However, one common question that users face when creating a stacked bar chart is how to show the grand total on the chart. In this article, we will explore how to show the grand total on a stacked bar chart in Tableau.

Creating a Stacked Bar Chart in Tableau

Before we dive into how to show the grand total on a stacked bar chart, let's first understand how to create a stacked bar chart in Tableau. To create a stacked bar chart, follow the below steps:

  1. Drag and drop the categorical variable to the Rows shelf.
  2. Drag and drop the numerical variable to the Columns shelf.
  3. Drag and drop the categorical variable again to the Color shelf.
  4. Change the mark type to Bar.
  5. Arrange the bars in descending order by dragging the categorical variable from the Rows shelf to the Sort field in the Marks card.
Creating A Stacked Bar Chart In Tableau

Show Grand Total on Stacked Bar Chart

Now that we know how to create a stacked bar chart, let's explore how to show the grand total on the chart. There are two ways to show the grand total on a stacked bar chart in Tableau:

Option 1: Add Total to the Table Calculation

The first option is to add a total to the table calculation. To do this, follow the below steps:

  1. Right-click on the numerical variable in the Columns shelf and choose Add Table Calculation.
  2. In the Table Calculation dialog box, choose the calculation type as Total.
  3. Choose the direction as Across Pane.
  4. Drag and drop the calculated field from the Measures pane to the right of the numerical variable in the Columns shelf.
  5. Right-click on the calculated field in the Columns shelf and choose Dual Axis.
  6. Synchronize the axes by right-clicking on the axis and choosing Synchronize Axis.
Add Total To The Table Calculation

Option 2: Add Total to the View

The second option is to add a total to the view. To do this, follow the below steps:

  1. Right-click on the categorical variable in the Rows shelf and choose Add Total > Row.
  2. Drag and drop the categorical variable from the Rows shelf to the Color shelf.
Add Total To The View

Conclusion

Showing the grand total on a stacked bar chart in Tableau is a simple process that can be done in two ways. By following the above steps, users can easily create a stacked bar chart with the grand total included to help them better understand the composition of their data.

Related video of Tableau Show Grand Total On Stacked Bar Chart