How to Make a Diverging Bar Chart in Tableau

Cody Schneider9 min read

A diverging bar chart is one of the most effective ways to show the difference between positive and negative values from a central baseline. Instead of having all your bars start from the same point, they stretch in opposite directions, making it incredibly easy to spot high and low performers at a glance. This guide will walk you through exactly how to build one step-by-step in Tableau, turning a basic bar chart into a powerful and insightful visualization.

What is a Diverging Bar Chart (and When to Use It)?

Think of a standard bar chart. All the bars start at zero and go in one direction. It’s great for comparing magnitudes - like total sales across different product categories. A diverging bar chart, however, is designed specifically for measures that have both positive and negative values, like profit and loss, or for showing variance from a target.

The bars “diverge” from a central line (usually zero). Bars representing positive values extend to one side (e.g., the right), and bars representing negative values extend to the other (e.g., the left). This creates a powerful visual contrast that instantly communicates performance.

Common Use Cases for a Diverging Bar Chart:

  • Profit and Loss Analysis: This is a classic example. Quickly see which products, regions, or departments are profitable and which are running at a loss.
  • Survey Results: A diverging bar chart is perfect for visualizing responses on a Likert scale (e.g., strongly agree, agree, neutral, disagree, strongly disagree). You can center the chart on "neutral" and show positive sentiment diverging one way and negative sentiment the other.
  • Performance vs. Target: Easily visualize which sales reps are above or below their quota, or which marketing campaigns are outperforming or underperforming their goals.
  • Year-over-Year Growth: Show which areas of the business have experienced positive growth and which have declined compared to the previous period.

The goal is to provide a balanced view, helping your audience immediately segment the data into two distinct groups: the good and the bad, the high and the low, or the growth and the decline.

Preparing Your Data

The good news is that you don’t need any special data structure to create a diverging bar chart in Tableau. At its core, your data needs just two things:

  1. A Dimension: This is the qualitative data you want to compare. It’s what each bar will represent. Examples include Product Category, Country, Campaign Name, or Sales Rep.
  2. A Measure: This is the quantitative data that drives the length and direction of the bars. The key is that this measure must contain both positive and negative values for the diverging effect to work. Examples include Profit, Variance from Target, or Net Score.

We'll use the Sample - Superstore dataset that comes with every copy of Tableau. It already has what we need: a Sub-Category dimension and a Profit measure with both positive and negative values - perfect for our example.

Step-by-Step: How to Make a Diverging Bar Chart in Tableau

Follow these steps to build your chart. We'll start with a standard bar chart and then transform it into a diverging one.

Step 1: Create the Basic Bar Chart

First, let's set up a simple horizontal bar chart as our foundation. This will give us the basic structure to build upon.

  • Open a new workbook in Tableau and connect to the Sample - Superstore dataset.
  • On a new sheet, drag the Sub-Category dimension from the Data pane onto the Rows shelf.
  • Next, drag the Profit measure onto the Columns shelf.

You should now see a horizontal bar chart where each bar represents the total profit for a sub-category. Some bars will be going to the right (positive profit) and some to the left (negative profit, or a loss). While this is technically functional, it’s not very visually appealing or immediately clear. The positive and negative values are the same color, making it hard to distinguish between them without reading the axis.

Step 2: Create a Calculated Field to Differentiate Color

This is where the magic happens. We need to tell Tableau to color the positive bars differently from the negative bars. The easiest way to do this is with a simple calculated field.

  • In the Data pane, right-click on an empty area and select Create Calculated Field.
  • Name your new field something intuitive, like Profit Color or Positive/Negative.
  • In the formula box, enter the following logic:

This formula checks the total profit for each mark (in our case, each sub-category). If the profit is greater than or equal to zero, it labels it as "Positive", otherwise, it labels it "Negative."

  • Click OK to save the calculated field.

Step 3: Apply the Color to the Bars

Now that we have our calculated field, let’s use it to color the chart. This simple action will transform your visualization.

  • Find your new calculated field, Profit Color, in the Data pane.
  • Drag Profit Color and drop it onto the Color mark in the Marks card.

Instantly, your bars will change color. By default, Tableau will assign two different colors. Now, you can clearly see the distinction between profitable sub-categories and unprofitable ones. To really make this pop, let's customize these colors.

  • Click on the Color mark again, and then select Edit Colors.
  • In the dialog box, you can assign custom colors. A popular convention is to use a cool color like blue or green for "Positive" and a warm color like orange or red for "Negative." This color combination is immediately understood by most audiences.
  • Click on "Positive," choose a nice blue. Click on "Negative," choose a contrasting orange. Click OK.

Your chart now looks like a proper diverging bar chart! All the profitable sub-categories are one color, and all the loss-making ones are another, diverging from the central zero line.

Step 4: Sort the Chart for Better Readability

Our chart shows the positive and negative values, but the order of the sub-categories is currently alphabetical. It would be much more powerful if we sorted it to immediately see the most profitable and most loss-making items.

  • Hover your mouse over the "Sub-Category" axis until a small sort icon appears. Click on it.
  • Alternatively, right-click the Sub-Category pill on the Rows shelf and select Sort.
  • In the Sort dialog box, under "Sort By," choose Field.
  • For "Field Name," select Profit.
  • For "Aggregation," make sure it’s set to Sum.
  • You can choose Ascending or Descending order. Descending will put your most profitable items at the top and your least profitable at the bottom, which is often the most intuitive view.

Now your chart tells a much clearer story. You can immediately identify "Copiers" and "Phones" as profit leaders, and "Tables" as the biggest source of loss.

Step 5: Clean Up and Add Finishing Touches

A few minor tweaks can take your visualization from good to great. Let’s clean it up for a professional finish.

  • Add Labels: To show the exact profit values, drag the Profit measure from the Data pane onto the Label mark in the Marks card. The numbers will appear on each bar.
  • Format Labels: The profit numbers might be long. Right-click the SUM(Profit) pill you just added to the Label mark, select Format, and in the pane that appears, choose Currency (Custom) and set the decimal places to 0 and the Display Units to Thousands (K) to keep it clean.
  • Edit the Title: Double-click the sheet title and give it a descriptive name like "Profit by Product Sub-Category."
  • Customize the Tooltip: Hover over a bar to see the tooltip. You can customize what information appears here by clicking the Tooltip mark. For example, you could add the Sales measure to the tooltip to show both profit and sales when a user interacts with the chart.

Advanced Tips and Tricks

Want to go a step further? Here are a few ways to add more context or adapt this technique for other purposes.

Diverging from a Custom Baseline (Not Zero)

Sometimes you don't want to diverge from zero. You might want to show performance against a specific target or an average. For example, let's say your average profit per sub-category is $1,000. You could create a calculated field called Profit Variance:

SUM([Profit]) - 1000

Then, you would use this new Profit Variance measure on the Columns shelf instead of Profit. Your chart would then show which sub-categories are above or below the $1,000 average, with the baseline centered on this custom value.

Labeling Both Ends of the Bar

By default, labels appear at the end of the bar. For a diverging chart, this means labels for negative values appear close to the center axis, which can look crowded. One clever trick is to create two separate calculated fields for labels:

  • Positive Labels: IF SUM([Profit]) >= 0 THEN SUM([Profit]) END
  • Negative Labels: IF SUM([Profit]) < 0 THEN SUM([Profit]) END

Put both of these fields on the Label mark. Then, edit the label formatting so that the "Positive Labels" are aligned to the right, and the "Negative Labels" are aligned to the left. This pushes the labels to the outer edges of the chart for a much cleaner appearance.

Final Thoughts

The diverging bar chart is a must-have in any data analyst’s toolkit. In just a few steps, you can create a powerful and intuitive visualization in Tableau that clearly communicates performance by separating the good from the bad and highlighting key areas for focus.

Mastering tools like Tableau is a huge advantage, but often the real bottleneck is simply getting your hands on clean, accessible data from all your different platforms. To help teams break through that barrier, we built Graphed. It connects directly to your marketing and sales tools - like Shopify, Google Analytics, and Facebook Ads - and lets you build real-time dashboards just by asking questions in plain English. Instead of spending hours in different reporting tools, you can create what you need in seconds.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.