Butterfly Chart in Tableau

While analyzing regional sales performance for our retail business, I wanted to understand how two customer segments, Consumer and Corporate, performed across different sub-categories in terms of total sales.

To compare the sales data for these two segments, I created a Butterfly Chart that displays Consumer sales on one side and Corporate sales on the other side of a central axis, with sub-categories listed in the center.

In this Tableau tutorial, I will explain what a Butterfly Chart is in Tableau and how to create a butterfly chart for data comparison.

What is a Butterfly Chart in Tableau?

In Tableau, a Butterfly chart is used to display and compare two sets of data that share a common axis. In this chart, the data is displayed in horizontal divergent bars on the left and right, and in the centre, we show the dimension for which we are comparing the data. It gets its name because the chart looks like a butterfly, with bars extending in opposite directions from a central axis.

The butterfly makes it easy to analyze and compare the differences between the two groups for each category.

Create a Butterfly Chart in Tableau

In this example, we will create a butterfly chart to compare the sales across different sub-categories for the product segments, consumer, and corporate.

For this tableau butterfly chart, we will use the Tableau Superstore data. Connect the tableau with the data source and follow the steps below to create a butterfly chart.

  1. In the superstore dataset, the segments consumer and corporate are stored in one field, segment. To take the values of these segments separately, we need to create the following calculated fields.
  • Consumer Sales:
IF [Segment] = "Consumer" THEN [Sales] ELSE 0 END
  • Corporate Sales:
IF [Segment] = "Corporate" THEN [Sales] ELSE 0 END
  1. Add the calculated field Consumer Sales and Customer Sales to the Columns, then add the Sub-Category to the Rows.
Create a Butterfly Chart in Tableau

Check out: Create Radial Bar Chart in Tableau

  1. To create a butterfly chart, we need to display the bar on the left side in a divergent way. Optionally, sort the order in decreasing order and right-click on the X-axis of Consumer Sales, then select Edit Axis.
Tableau butterfly chart
  1. In the Edit Axis window, select the checkbox Reversed in the Scale section.
Create Tableau butterfly chart
  1. Now, we will see that the horizontal bars for the Consumer sales are in a divergent format. These left and right side bars represent the wings of a butterfly.

To differentiate the data, we can also change the color or wings. To do this, go to the Marks section and select the Color card for the measure you want to change the color of.

From the color palette, select the color you want to assign.