Composition can be defined as looking at a particular measure compared to the whole.
For example, In a "Sales by Region" chart, the sales for each singular region would be a discrete value while the total sales across all countries would be the "Whole".
Total sales can be divided into "Relative shares" for each region. Having information on "Relative Sales Percentages" as compared to the total sales has a greater impact rather than viewing just the plain sales figures. Eureka moments are much more likely when people use a tool to answer their own questions, which is a core belief behind the design of Qlik Sense.
As with everything else, data composition can be visualized in multiple ways. Understanding what you are trying to achieve will eventually dictate the best choice of visualization.
For example, depending on what matters, each of the following points will favor a different form of visualization:
As such, each example in the next four recipes will be supported by a goal, questions, and an analysis description, which is as follows:
Downloading the source files:
Downloading the example code
You can download the example source files from your account at http://www.packtpub.com, for all Packt books that you have purchased. If you have purchased the book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Use the following steps to get started:
Chapter 2 - Sales.qvf
application from the Packt Publishing websiteC:Users<user>DocumentsQlikSenseApps
Composition
.m
) and dimensions (d
) in the same order as follows:(m) Sum(Sales) (d) Month (d) Region
Enabling the right property settings can turn a line chart into a stacked area chart. This clearly shows the differences when we analyze the relative and absolute composition of many time periods, as shown in the preceding example. If you had less time, say the last 3 years, then you would use the same approach, however; you will change the chart type to Bar instead of Line as the magnitude of change is more important than the change trend.
When looking at the composition in terms of accumulation or subtraction from the TOTAL, a good option for representation is the waterfall chart. If the only important differences are the relative differences are, then write your calculation as a percentage of Total.
To achieve this, follow the following steps:
Sales
expression from the preceding recipe with the following:Sum(Sales) / sum( TOTAL <Month> Sales).