Before starting to create chart diagrams, delete the filters we've created in the previous section or create a new sheet.
To create a Qlik Sense visualization, you need to know three important things:
We're going to start with a very basic chart. Our objective is to create a pie chart like the chart in the following screenshot. This chart explains the distribution of our customers between two channels – Horeca and Retail:
In this pie chart, the dimension is Channel and the measure is the number of customers. On the left-hand side of the following screenshot, there is a bar with all of the different charts that Qlik Sense provides. Drag a pie chart and drop it into the central area as shown in the following screenshot. Change the size of the chart with the orange lines and place it wherever you prefer:
In order to finish the pie chart, you need to choose a dimension and a measure, and change the title to an appropriate one. In order to add Channel as the dimension, click on Add measure and select Channel_Desc. Finally, add Count([Customer_ID]) as the measure. This is shown in the following screenshot:
Close the edit mode by clicking on Done:
You've finished your first pie chart and it tells you that 67.7 percent of your customers belong to Horeca and only 32.3 percent belong to Retail.
Now I would like to understand which customers spend more money. I will create a bar chart using Channel_Desc as the dimension and the average money spent as the measure. Drag-and-drop a bar chart into the central area, change its title, and select Channel_Desc as the dimension and avg([Total_Spent]) as the measure. Your bar chart might look similar to the following screenshot:
You've created a chart that tells you that, on average, Retail customers spend more money than Horeca customers. I would like to improve this bar chart. Turn the Edit mode on and click on Bar chart to select it. On the right-hand side, you have a bar with the chart properties. For a bar chart, the properties are organized around five areas:
These areas are shown in the following screenshot:
Bar charts are a very good measure to see the difference in the average money spent by Horeca and Retail customers, but it's hard to see the exact value. For this reason, we'll put the exact value in the chart. We're going to change the labels for the dimension and the measure, from Channel_Desc and Avg(Total_Spent) to Channel
and Avg. Spent
, by following these steps:
These steps are demonstrated in the following screenshot:
Finally, in the pie chart we created before this bar chart, Retail and Horeca customers appeared colored in blue and red, but in the bar chart, all bars are blue. In order to have a consistent application in terms of color, we'll change the color properties of the bar chart to have the same colors as in the pie chart. As you can see in the following screenshot, we need to turn off the Auto mode from the Color option and set it to By dimension:
Now we've created two plots that explain that we have more Horeca customers than Retail customers, but on average our Retail customers spend more money on our business:
I know that, on average, I'm earning more money with the Retail channel customers, but my next question is: in which channel am I earning more money in absolute terms?
Create a new bar chart with Channel_Desc as the dimension and the following six measures:
Delicatessen
Detergents
Fresh
Frozen
Grocery
Milk
In the Appearance menu, expand the Presentation submenu. In this bar chart, we'll see six different measures; we can see these measures grouped in six different bars for Retail and six for Horeca. We also can see the six metrics stacked in one single bar. In this case, stacking the metrics in a single bar has the advantage of us being easily able to see the total money spent. This is illustrated in the following screenshot:
With this new bar chart, you can see that we're earning 8 million with our Horeca customers and 6.62 million with our Retail customers. We can also see that Horeca customers spend 4 million in Fresh products. The Retail customers spend 2.32 million in Grocery products:
We've created a pie chart and two bar charts to understand how Horeca and Retail customers are buying our products. Now, repeat the three charts by changing the dimension from Channel_Desc
to Region_Desc
, as shown in the following screenshot:
To finish our application, we're going to create a table with our top customers and two filters. Tables are different from regular charts because tables have columns; when you add a new column to a table, Qlik Sense asks you if the new column is a dimension or a measure. To create a table of top customers, drag a table and drop it into the central area. Choose Customer_ID as the dimension and sum(Total_Spent) as the measure. Limit the number of customers to 10 and sort by Total Spent, as shown here:
To finish the application, we'll add two filters. Go to the left-hand side bar, open the Fields list, and drag-and-drop Channel_Desc and Region_Desc into the central area:
Click on the Save button on the top bar and turn the Edit mode off. We've finished our first application. In the next section, we'll use this application to answer business questions:
These charts tell us that 67.7 percent of our customers were Horeca customers and only 32.3 percent were Retail customers. On average, Retail customers spent more money on our products, but in absolute values, Horeca customers spent more money.
We have three regions – Lisbon, Porto, and Others. 17.5 percent of our customers were located in Lisbon, 10.7 percent in Porto, and 71.8 percent in Other regions. The average money spent is similar in all the regions, but the total spent is higher in Other regions than in Lisbon and Porto.
Now, we're going to use the filters to respond to more questions.