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.
- In the Tableau sheet, drag the Subcategory to the Rows shelf.

- We need to find the Profit for each region, for that we will add the Sum(Profit) to the Columns section.

Now, you will see divergent bars for product sub-categories, with lower sales and lower profit.
- 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.

- On the axis, select the Range as custom and enter -5000 in the Fixed start and 150000 in the Fixed end.

- 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‘.

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

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.

- 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.

- In the format, select the Currency option. Now, the values of Profit and Loss will be displayed as currency.

- At last, select the Entire view for the chart to set the stacked bar chart to the appropriate proportions.

- We can also sort the stack bars by Profit in ascending or descending order using the sort button on the X-axis.

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.
- 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.

- 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.

- 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.
- 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
This formula will filter the West region data and display it on the negative (left) side.
Check out: Add Charts to Reports in Salesforce
- 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.

- To stack this divergence chart, we will add the Segment dimension to the color card. This stacks the regional sales by product segment.

- To add the sales number, drag the Sales measure to the Label card.
- 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.

- Now, we can see the Sales values in the currency format. To set the chart in an appropriate proportion, select View as Entire View.

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.”

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

This way, we can create a diverging stacked bar chart in Tableau to compare sales between two regions.
Difference: Normal vs Divergent Bar Chart
| Feature | Normal Bar Chart | Divergent Bar Chart |
|---|---|---|
| Direction | One side | Both sides |
| Use Case | Simple comparison | Positive vs negative |
| Analysis | Basic | Advanced comparison |
| Insight | Limited | More 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:
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.