Comparing categories against a measure with a bar chart

This example shows how to make a bar chart to visualize sales data and how to compare different product groups against the same measure.

Stacked chart.

Dataset

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:

  • Sales.xls
  • 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.

Measure

We use the sales volume as the measure, by creating a measure in Master items with the name Sales, and the expression Sum(Sales).

Visualization

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:

Bar chart.

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.

Stacked chart.

Discovery

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.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?