Using comparison sets in Set Analysis
The following chart is a stacked bar chart, a standard way of comparing separate entities. Each value that you select is displayed as a segment in each bar by year:
Using a comparative analysis allows you to group the separate selections dynamically so that you can compare them against one another. In the preceding example, we can group together Plum
and Apple
versus Fig
and Orange
.
Getting ready
For the purpose of this recipe, we will make use of an inline data load that gives yearly sales information for different fruits. Load the following script in the Qlik Sense Data load editor
:
Data: LOAD * INLINE [ Fruit, Year, Sales Apple, 2013, 63 Apple, 2014, 4 Cherry, 2014, 1150 Cherry, 2013, 1180 Fig, 2013, 467 Fig, 2013, 374 Fig, 2014, 162 Orange, 2013, 131 Orange, 2013, 145 Orange, 2014, 102 Pear, 2014, 489 Pear, 2014, 782 Plum, 2013, 148 Plum, 2014, 412 ]; DataIslandFruit: ...