This example shows how to make a bar chart to visualize sales data and how to compare different product groups against the same measure.
In this example, we'll use two data files available in the Qlik Sense Tutorial - Building an App. Download and expand the tutorial, and the files are available in the Tutorials source folder:
- Item master.xls
To download the files, go to Tutorial - Building an App.
Add the two data files to an empty app, and make sure that they are associated by Item Number.
The dataset that is loaded contains sales data. The Item master table holds the information about the items ordered, such as product groups.
We use the sales volume as the measure, by creating a measure in Master items with the name Sales, and the expression Sum(Sales).
We add a bar chart to the sheet and set the following data properties:
- Dimension: Product Group (product group).
- Measure: Sales; the measure that was created as a master item.
The following bar chart is created, with a bar showing the sales for each product group:
But we want to have some more detailed information about the product sales, by adding the Product Sub Group as a dimension. The Product Sub Group field divides the product groups into sub groups. By default, a grouped chart is selected when adding the second dimension. We want to display a stacked chart instead, that is changed under Appearances in the properties panel.
The bar chart visualizes the sales volume of different product groups, divided into product sub groups. The visualization is sorted in order of sales volume per product. You can hover the mouse pointer over a product sub group and view the details.
In the bar chart we can see that Produce has the highest sales volume. One of the sub products contribute to most of the Produce sales, if we hover over that part of the bar we can see it is Fresh Vegetables.