![](https://static.wixstatic.com/media/c5c62b_754872d4684d44a39de49cf124c10ed2~mv2.png/v1/fill/w_980,h_509,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/c5c62b_754872d4684d44a39de49cf124c10ed2~mv2.png)
(Image by Author)
Introduction-
What is a Butterfly Chart?
A butterfly chart also called Tornado or Divergent chart in Tableau is a kind of bar chart used to compare two different metrics and two data sets at a time. This chart plots the data as two horizontal bars with the same X-axis in the center. They are so named because the final chart visually resembles either one half or a complete butterfly. So we need the reverse the bar chart of one side to make it look like a butterfly.
Butterfly diagrams, also called butterfly plots or butterfly charts, are a special type of Bar chart, where the data categories are listed vertically instead of the standard horizontal presentation, and the categories are ordered so that the largest bar appears at the top of the chart, the second largest appears second from the top, and so on.
Use Cases:
It is useful when you are comparing something like the population of a Country, State, or City. Say for the male gender population, and the female gender population of the Country, Comparing the previous year's sales and the current year's sales for the same product as well as for two different products, comparing the profit of two different companies in a single year.
Let’s dive deep into making a beautiful Butterfly Chart.
Problem Statement-
‘Rate of male employees vs female employees in different job roles in the company"
Dataset: HR Data
Let's start by loading the Sample HR Dataset into Tableau and following the given steps on the new Sheet.
Step 1: Select Job Role (Dimensions) and put it in the rows field.
![](https://static.wixstatic.com/media/c5c62b_d910c202c5c3469e939ad5e38553e3cc~mv2.png/v1/fill/w_890,h_510,al_c,q_90,enc_auto/c5c62b_d910c202c5c3469e939ad5e38553e3cc~mv2.png)
(image by author)
Step 2: Create two calculated fields one is for the "Rate of Male Employees" and the other one is "Rate of female Employees".
![](https://static.wixstatic.com/media/c5c62b_7d5ac57e51ea4608b9775d198647c0ac~mv2.png/v1/fill/w_980,h_544,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/c5c62b_7d5ac57e51ea4608b9775d198647c0ac~mv2.png)
(image by author)
![](https://static.wixstatic.com/media/c5c62b_7a5896ae2cad49d4a1b2fb2ca4b98ec7~mv2.png/v1/fill/w_980,h_589,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/c5c62b_7a5896ae2cad49d4a1b2fb2ca4b98ec7~mv2.png)
(Image by Author)
Step 3:Select the Rate of Male and Rate of Female calculated fields and put them into columns.
![](https://static.wixstatic.com/media/c5c62b_9aeca39f6d774f21abb25d7b8bb34381~mv2.png/v1/fill/w_975,h_355,al_c,q_85,enc_auto/c5c62b_9aeca39f6d774f21abb25d7b8bb34381~mv2.png)
(Image by author)
Step -4: Create one more calculated field called zero axes and just give it a value ‘0’ and after creating it we will put it into the middle of the two existing column names in the chart. So that the Job role names will be displayed in the middle.
![](https://static.wixstatic.com/media/c5c62b_b82811eacbef46b085844631f3ff91d1~mv2.png/v1/fill/w_980,h_370,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/c5c62b_b82811eacbef46b085844631f3ff91d1~mv2.png)
![](https://static.wixstatic.com/media/c5c62b_0eb79123582841e4baa088208a8f34f8~mv2.png/v1/fill/w_975,h_399,al_c,q_90,enc_auto/c5c62b_0eb79123582841e4baa088208a8f34f8~mv2.png)
(image by author)
Step 5: Now drag the Job role into 'label' under the Mark in the zero line so that the different names of the Job role will be displayed in the middle. As the various job roles are already displayed in the middle there is no need to display the header at the left-hand side. We can hide it by unchecking the show header option under the edit axis.
![](https://static.wixstatic.com/media/c5c62b_9e8179e73d074ed58b9a78cec2b23ac8~mv2.png/v1/fill/w_980,h_420,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/c5c62b_9e8179e73d074ed58b9a78cec2b23ac8~mv2.png)
(image by author)
Step 6: As this is going to be a butterfly chart, we must work on the axis a little bit so changes the left one by changing it to reverse mode by clicking on the edit axis. Under scale, select reversed. So, the graph for the rate of Male Employees will be reversed in this case. Also, change the bar chart to text under the mark of the zero line. Quite lastly we will change the view to the entire view.
![](https://static.wixstatic.com/media/c5c62b_7c63c99d66ef466da5339cd9554cd619~mv2.png/v1/fill/w_975,h_442,al_c,q_90,enc_auto/c5c62b_7c63c99d66ef466da5339cd9554cd619~mv2.png)
(image by author)
Step 7: As we are working on two different genders let's differentiate them by adding two different colors to the two different genders. Let’s choose Pink for Females and keep blue which is quite intuitive as it is for male employees and blue as it is for male employees. Also, add one more zero line to the columns for the female employees' rate and add job role to the label, and under mark change the bar graph to text.
![](https://static.wixstatic.com/media/c5c62b_45cee5cb5cb94154a5311a1425ad50df~mv2.png/v1/fill/w_975,h_483,al_c,q_90,enc_auto/c5c62b_45cee5cb5cb94154a5311a1425ad50df~mv2.png)
(image by author)
Step 8: Now that we already know the left one is for males and the right one is for females, let’s change the description to male % and female %. Clean up, show up a little bit, and let’s choose none in the tick marks in case of both male and female.
![](https://static.wixstatic.com/media/c5c62b_acddfdde9a3d45568119a30c33455c9b~mv2.png/v1/fill/w_975,h_481,al_c,q_90,enc_auto/c5c62b_acddfdde9a3d45568119a30c33455c9b~mv2.png)
![](https://static.wixstatic.com/media/c5c62b_2af6116acc7144a7ae4d531563ae4d70~mv2.png/v1/fill/w_975,h_482,al_c,q_90,enc_auto/c5c62b_2af6116acc7144a7ae4d531563ae4d70~mv2.png)
Step 9: Step 9: let’s clean up the lines a little bit so that the lines will not be visible in both zero-line graphs. When we go to the format side there, we will just make all the zero lines to none though it’s a quite tedious job.
![](https://static.wixstatic.com/media/c5c62b_4098862013b74e62a1b314f2ddd8fb7f~mv2.png/v1/fill/w_980,h_492,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/c5c62b_4098862013b74e62a1b314f2ddd8fb7f~mv2.png)
![](https://static.wixstatic.com/media/c5c62b_06ffdfee533f4aa7baddb9dfd31f526a~mv2.png/v1/fill/w_975,h_482,al_c,q_90,enc_auto/c5c62b_06ffdfee533f4aa7baddb9dfd31f526a~mv2.png)
(Image by Author)
Step 10: Now let's remove the names zero lines from the sheet by following the below steps.
![](https://static.wixstatic.com/media/c5c62b_540f89e1f90f4426ad9e654f8c09b4a7~mv2.png/v1/fill/w_975,h_483,al_c,q_90,enc_auto/c5c62b_540f89e1f90f4426ad9e654f8c09b4a7~mv2.png)
![](https://static.wixstatic.com/media/c5c62b_2b9dcad275bb47c5abff555dd2befeb7~mv2.png/v1/fill/w_975,h_486,al_c,q_90,enc_auto/c5c62b_2b9dcad275bb47c5abff555dd2befeb7~mv2.png)
(Image by Author)
Step 11: Also change the size of the text and also change the alignment of it in both the zero line and also fix the tooltips in both the charts of male and female employees.
![](https://static.wixstatic.com/media/c5c62b_04dfe4752cb7493d8a73e3c690931334~mv2.png/v1/fill/w_975,h_477,al_c,q_90,enc_auto/c5c62b_04dfe4752cb7493d8a73e3c690931334~mv2.png)
![](https://static.wixstatic.com/media/c5c62b_22fb79903fbe4b10b570ed561b5708ab~mv2.png/v1/fill/w_975,h_482,al_c,q_90,enc_auto/c5c62b_22fb79903fbe4b10b570ed561b5708ab~mv2.png)
(Image by Author)
Step 12: Now choose the dual axis in both the zero line graphs and also synchronize it .
![](https://static.wixstatic.com/media/c5c62b_4c78b48e14cc44b393dcffba6131a782~mv2.png/v1/fill/w_975,h_486,al_c,q_90,enc_auto/c5c62b_4c78b48e14cc44b393dcffba6131a782~mv2.png)
![](https://static.wixstatic.com/media/c5c62b_e341658c0ef749b893f975235b9b4ee5~mv2.png/v1/fill/w_975,h_484,al_c,q_90,enc_auto/c5c62b_e341658c0ef749b893f975235b9b4ee5~mv2.png)
(Image by Author)
Step 13: After converting it to dual axis, go to the edit axis of the left chart and change the range to fixed and give it the required range. Simultaneously go to the tick mark tab and change the range from none to fixed and give the interval. Meanwhile, go edit the axis, and change the axis format to the percentage for both charts by keeping the decimal place to 0.
![](https://static.wixstatic.com/media/c5c62b_b29b5d4bdd4249489518254719b1bb14~mv2.png/v1/fill/w_975,h_483,al_c,q_90,enc_auto/c5c62b_b29b5d4bdd4249489518254719b1bb14~mv2.png)
(Image by Author)
![](https://static.wixstatic.com/media/c5c62b_4b0aa91fed774a9b847989595226736e~mv2.png/v1/fill/w_975,h_474,al_c,q_90,enc_auto/c5c62b_4b0aa91fed774a9b847989595226736e~mv2.png)
Step 14: After few other formatting like changing the color of the job role (2) in and dragging the Job Role (Dimension) to the label under marks we will be able to see the below result.
![](https://static.wixstatic.com/media/c5c62b_f314067fea57413fa0797de4b5d33f74~mv2.png/v1/fill/w_975,h_481,al_c,q_90,enc_auto/c5c62b_f314067fea57413fa0797de4b5d33f74~mv2.png)
(Image by Author)
Voila!
Findings: It is found that percentage of male employees is higher than the female in every job roles and for Human Resources it is most.
Conclusion:
This is the efficient, effective and easy way to compares two measures. Here I have done the comparison in between male and female employees percentage in the company.
Great ! Nicely explained