Tableau Divergent Stacked Bar Chart (Complete Guide with Examples)

In data visualization, it is very important to present data in a way that is easy to understand and compare.

One of the most powerful ways to show both positive and negative values together is by using a divergent stacked bar chart in Tableau.

This type of chart helps users quickly understand differences, trends, and performance across categories without confusion.

Using Tableau, we analyzed the profit-and-loss performance of our product across different regions. To achieve this, we had to visualize the data to highlight which product subcategories were generating profits and which were in losses, for each region.

To visualize this data, we created a diverging stacked bar chart in Tableau. In this stacked bar, we used the region as a dimension.

To show divergence in the chart, we will display positive (profit) bars on the right and negative (Loss) bars on the left, both stacked by product subcategory.

In this article, we will learn what a divergent stacked bar chart is, when to use it, and how to create it step by step in Tableau.

We will also explore real-time business use cases, examples, common mistakes, and best practices.

By the end of this guide, you will be able to create professional-level charts that improve your data analysis skills.

What is a Divergent Stacked Bar Chart in Tableau?

In Tableau, a divergent stacked bar chart is a horizontal bar chart format that displays data with categories that have both positive and negative values, or split into a comparison view.

This chart is mainly used when:

  • You have both positive and negative values
  • You want to compare two groups
  • You want to highlight differences clearly

In a normal bar chart, all values start from zero and go in one direction. But in a divergent chart, the bars move in opposite directions, making it easier to compare performance.

When we combine this with stacking, we get a divergent stacked bar chart, where multiple categories are shown within each bar, each in a different color.

Use case of stacked bar chart in Tableau:

We can use a divergent stacked bar chart to display profit and loss for different products in specific regions. Here, the data will be stacked by the product category, showing profit and loss.

Another use case for the diverging stacked bar chart is when you need to compare data from two dimensions. The comparison can be the sales of two regions for the product categories.

Why Use a Divergent Stacked Bar Chart?

This chart is very useful in real-world scenarios because it helps in better decision-making. A standard bar chart shows values, but a divergent chart shows comparison + direction (positive/negative).

According to visualization principles, bar charts are used to compare values across categories, and stacking helps show how sub-categories contribute to the total.

So combining both gives:

  • Clear comparison
  • Better storytelling
  • Easy identification of gain vs loss

Create a Divergent Stacked Bar Chart in Tableau

In the examples below, I will explain both the use cases:

  • Create a Divergent Stacked Bar Chart for Profit-Loss in Product Sales
  • Create a Divergent Stacked Bar Chart to Compare Sales of Two Regions

To create the divergent stacked bar chart, we need the data source. In the examples that follow, I will utilize the Superstore data from Tableau.

Divergent Stacked Bar Chart for Profit-Loss in Product Sales

After selecting the data source in Tableau, click on the Sheet tab in Tableau and follow the steps below.

  1. In the Tableau sheet, drag the Subcategory to the Rows shelf.
Divergent Stacked bar chart in Tableau
  1. We need to find the Profit for each region, for that we will add the Sum(Profit) to the Columns section.
Tableau divergent stacked bar chart

Now, you will see divergent bars for product sub-categories, with lower sales and lower profit.

  1. We need to modify the default range of positive and negative values on the X-axis. For this, right-click on the X-axis (profit) and select Edit Axis.
Create Divergent stacked bar chart in tableau
  1. On the axis, select the Range as custom and enter -5000 in the Fixed start and 150000 in the Fixed end.
Divergent Stacked bar chart in Tableau desktop
  1. Here, we will stack the bar graph with the profit and loss for the regions. Drag the Region dimension to the Color card in the Marks section.

Here, also set the Marks type from ‘Automatic‘ to ‘Bar‘.

Stacked bar chart with divergence in Tableau

After stacking the bar chart by Region, we can see product sales, profit, and loss for each region, identified by the region’s color.

How to create divergence in Tableau stacked bar chart

Check out: Stacked Bar Chart With Multiple Measures in Tableau

6. To show the exact amount of the profit and loss in the divergent stacked bar chart, drag the Sales(sum) to the Label card.

Create divergence in Tableau stacked bar chart
  1. Now, the Sales values will appear in the profit and loss for each region, stacked by color. The values will appear as numbers; to change them to a Currency format, click the Sum label and select Format.
Create a Divergent stacked bar chart in Tableau
  1. In the format, select the Currency option. Now, the values of Profit and Loss will be displayed as currency.
Tableau Stacked bar chart divergence
  1. At last, select the Entire view for the chart to set the stacked bar chart to the appropriate proportions.
Tableau Stacked bar chart with divergence
  1. We can also sort the stack bars by Profit in ascending or descending order using the sort button on the X-axis.
Create Stacked Bar chart with divergent bars

This way, we can create a divergent stacked bar chart in Tableau to display the profit and loss in product sales.

Check out:  Create a Pie Chart in Tableau

Create a Divergent Stacked Bar Chart to Compare Sales of Two Regions

In this example, we will use a stacked bar chart to compare sales between two regions.

  1. In this example, we need the Sales distributed by category; for that, drag the Sales to the Columns and the Sub-Category to the Rows.
Divergence stacked bar chart in Tableau
  1. Add the Region dimension to the color card. Here, we will consider only two regions: East and West. To remove other regions, click on them and select Exclude.
Create Tableau divergent stacked bar chart
  1. Now, we will see the sales of two regions stacked for each region. To make this divergence, we need to add a calculated field.

Click on the Analysis tab and select Create a Calculated field.

  1. Enter the name for the calculated field, then enter the formula below to create a divergence between the sales data for the East and West regions.
If [Region] = 'West' THEN -[Sales] ELSE [Sales] END
Calculated field in Divergent Tableau bar chart

This formula will filter the West region data and display it on the negative (left) side.

Check out: Add Charts to Reports in Salesforce

  1. Add the calculated field to the Columns and replace it with Sum. With this, we can see the divergence in the Sales data for the east and west regions.
Divergence in Tableau Stacked bar chart
  1. To stack this divergence chart, we will add the Segment dimension to the color card. This stacks the regional sales by product segment.
Create Stacked bar chart with divergence in Tableau
  1. To add the sales number, drag the Sales measure to the Label card.
  2. To convert the Sales values from Numbers to currency, click “Sales” on the label card, then select “Format”.

In the format, select the default numbers as currency.

Compare data using divergence stacked bar chart in Tableau
  1. Now, we can see the Sales values in the currency format. To set the chart in an appropriate proportion, select View as Entire View.
Tableau stacked divergent bar chart

In this divergent stacked bar chart, we are comparing the values of two sales regions. For this, we don’t need a value indicator on the x-axis. To remove this, click it and uncheck “Show header.”

Tableau Divergent Bar Chart Stack values

We can also sort the bar chart by row value (sub-category) in increasing or decreasing order using the sort button.

Sorting in Tableau divergent stacked bar chart

This way, we can create a diverging stacked bar chart in Tableau to compare sales between two regions.

Difference: Normal vs Divergent Bar Chart

FeatureNormal Bar ChartDivergent Bar Chart
DirectionOne sideBoth sides
Use CaseSimple comparisonPositive vs negative
AnalysisBasicAdvanced comparison
InsightLimitedMore clear

Frequently Asked Questions

Q1: What is a divergent stacked bar chart?

It is a chart that shows positive and negative values on opposite sides with stacked categories.

Q2: When to use this chart?

When comparing profit vs loss or two groups.

Q3: Can we use this without negative values?

No, divergence requires negative values.

Q4: Is this chart beginner-friendly?

Slightly advanced but easy with practice.

Conclusion

A divergent stacked bar chart in Tableau is a powerful visualization tool that helps you clearly compare positive and negative values. It combines the benefits of stacked charts and divergent charts, making it ideal for analyzing business performance, sales data, and survey results.

By following the steps and best practices outlined in this guide, you can create professional, insightful dashboards. Focus on clarity, simplicity, and real-world use cases to make your charts more effective.

You may also like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.