Create Diverging Bar Chart in Tableau

In our organization, I was analyzing the product sales data across the regions. In this data, we need to know how each region is performing, not only in terms of total sales but also in terms of profits.

In the Sales data, we need to compare the data of sales and profit, as high sales don’t always reflect high profits.

For this data visualization to compare product sales and profits, I created a Tableau diverging bar chart. With this chart, it was easy to compare sales and profits on diverging bars.

In this Tableau tutorial, I will explain the Diverging Bar chart in Tableau and how to use it to visualize data comparison.

Diverging Bar Chart in Tableau

In Tableau, the diverging bar chart displays bars extending in opposite directions from a centre to compare two categories of data. It is useful for highlighting differences between two sets of data, such as sales and profit, or subcategories, by showing their divergence from a central point. 

It is basically a combination of two bar charts, in which we reverse the bars of one measure using a dual axis to show divergence. For a clear comparison, we can add colors to the diverging bars.

Create a Diverging Bar Chart in Tableau

To create a Diverging bar chart in Tableau, we will use the Tableau Superstore dataset. Now, connect the Tableau with the data source and follow the steps below to create a diverging bar chart.

In this chart, we will visualize the comparison of profit and sales across regions. For this, drag the Sales and Profit to the Columns. After this, add the Region to the Rows.

Tableau Diverging Bar Chart

To create the divergent bar chart, right-click on the Sales axis and select Edit Axis. In the edit window, select the Scale for Sales axis as Reversed.

Reverse Tableau Bar chart

This will show divergence in the bars of Sales and Profit measures. Now, to show the Sales and Profit label, click on All Marks Label and select Show Marks Label.

Compare data in Tableau diverging bar chart

To show the Sales and Profit figures in terms of currency, click on the Sales in the Columns and select Format.

In the format settings, go to the Default section and in the Numbers select Currency (custom).In the Currency settings, set decimals to zero and select Display Units as Thousand to display “K” in values.

In the Prefix, select the currency symbol, such as $ for dollars.

Show Currency in Tableau diverging bar chart

To remove the grids in the diverging bar chart, right-click on the chart and select Format.

Remove grids in Tableau Diverging chart

To remove the grid line dividing the diverging bars, click on the Border icon. Then click on the Columns tab, and select Column divider as None.

Tableau Divergent bar chart

To remove the horizontal and vertical grids, click on the Lines icon. Then, in the Rows tab, select Grid Lines and Zero Lines as None.

Customize Tableau Diverging Bar Chart

We have already added currency labels, so we don’t need the labels on the axis. To remove it, click on the Sales axis and select Edit Axis.

In the Edit Axis, click on the Ticks Marks tab and select Major Tick Marks as None.

Create divergence in Tableau Bar Chart

Now, for easy comparison, we wil add a different color to the profit and sales bar. For this, add the Measures Names to the Color card in the All Marks section.

Add color in Tableau Diverging Bar Chart

To change the default color of the bars, double-click on the color field on the right side. Select another color from the color palette and click OK.

Edit Bar Color in Tableau Diverging Bar chart

We can also sort the bars in ascending or descending order using the sort button, based on either sales or profit values.

Tableau Horizontal Diverging bar chart

With this, we can view and compare the profit and sales for each region in the Tableau Diverging bar chart.

This way, we can create a diverging bar chart in Tableau by following the above steps.

Conclusion

In this Tableau tutorial, we have learned about the diverging bar chart in Tableau. In the examples, we create a diverging bar chart to show the data comparison between the Sales and Profit values across different regions.

We also learned to format the label to display currency values and to edit the bar colors in the diverging bar chart. By following the above steps, you can easily create a diverging bar chart in Tableau to compare data.

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.