Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Gartner® Magic Quadrant™: 15 YEARS A LEADER - GET THE REPORT
Jennell_McIntire
Employee
Employee

Last week a new presentation option for the bar chart was introduced in Qlik Cloud. The Butterfly presentation format displays two measures that mirror one another along the axis based on a single dimension. In the past, there have been methods used to generate the butterfly chart but now, it is a property option in the bar chart. Below are examples of butterfly charts.  In the first example, the butterfly chart is comparing the average salary for men and women by country.  In the second example, game stats are being compared for two selected college basketball teams.

Human Capital Management

example1.png

 

Bracket Mania

example2.png

 

Let’s look at how easy it is to create a butterfly chart. In the Human Capital Management example, the butterfly chart is comparing the average salary for men and women by country. The butterfly chart requires one dimension and two measures. In this example, Country is the dimension, and the two measures are as follows:

female.png

 

male.png

 

One measure for women and one measure for men. Both measures in a butterfly chart must return positive values to be displayed. If you are like me and used the old trick of creating butterfly charts by making one of the measures negative, you can simply remove that part of the expression to update your chart. In the app, both measures are master items, and a master color is applied to the measures so that males and females are different colors consistent with the rest of the app. Now, the only thing left to do is change the presentation to butterfly. This can be done from the properties of the bar chart in the Presentation > Styling section.

styling.png

 

 

 

 

 

 

 

In both examples, the bar charts are horizontal, with mirroring measures on the y-axis. You also have the option to display the bar chart vertically. In this case, the mirroring measures will be on the x-axis.

Simple, right? As long as there are two items to be compared like male/female or team 1/team 2, a butterfly chart makes a nice alternative to the standard grouped or stacked bar chart. Try it for yourself and learn more at Qlik Help.

Jennell

2 Comments
QFabian
Specialist III
Specialist III

awesome @Jennell_McIntire , one of the things that power bi uses or used to to talking against Qlik!

0 Likes
390 Views
mshann01
Creator
Creator

It would be nice if you could use a dimension field to define the grouping instead of maintaining 2 expressions.  I can envision selecting the dimension from a drop down and then selecting exactly 2 dimension values.  For instance, if there are possible values of 'male', 'female', and 'unknown' then you would check off the first 2 to display in the chart.

0 Likes
267 Views