Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

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 page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!