Tableau Butterfly Chart is the combination of two bar charts on either side of the same y-axis. Typically, Tableau Butterfly Chart helps to compare two data sets at a time. In this article, we use the superstore excel file to build the Tableau Butterfly Chart.
Creating a Butterfly Chart
Drag and drop the Sub-Category dimension to the row shelf.
Next, drop the Sales measure into the column shelf multiple times. By default, it displays two horizontal bar charts side-by-side.
Right-click on the dimension section to create a calculated field, and select Create Calculated Field.. option from the context menu.
We named the calculated field as Zero and placed 0, which means it shows zeros.
Drag the Zero calculated field onto the columns section in-between the two sales fields. As you see, we have Sales, Zero, Sales, Zero in columns shelf, and Sub-Category in Rows shelf.
Convert the Circles of Zero field to Bars using Marks shelf.
Next, we are converting the remaining column measure fields to bar charts by changing Marks.
Now, you can see the Bar graphs. We have to convert this to Tableau Butterfly Chart.
Let me change the Zero field to Tableau Text or labels.
As its value is Zero, it shows Abc as the text.
Select and right-click on the Sales field, zero fields, and select Synchronize Axis option.
Now the data of both the measures have synchronized.
Right-click on the axis and select the Edit Axis option.
It opens the Edit Axis window to change the range. As you see, by default, the synchronization selects the range automatically.
Let me change this option to Fixed and change the start value as 0 and end value as 347,101.602227. By this, both the Sales and Zero will be on the same scale.
You can see the Tableau Butterfly Chart.
We have to do the same for the remaining Sales and Zero measures. So, right-click on the Zero measure and click the Dual Axis option.
It almost completes the Tableau Butterfly Chart.
Again, Right-click on the second axis and select the Edit Axis option.
Here, we also changed the range from automatic to fixed, with 0 and 0 as the start and end values. Next, we also check-marked the logarithmic option.
Changing the Marks from bar to text will show the text for the other half of the tableau butterfly chart.
We left it as it is, and you can see the final Tableau Butterfly Chart.