Narratives for Qlik can generate insightful and contextual narratives about histograms. This guide will walk through how to utilize this feature and how it integrates with the way users make histogram bar charts in Qlik Sense.
A histogram narrative (different than a standard bar chart) will discuss:
- The most noteworthy buckets of your histogram
- Where the data points are most concentrated
- Trends across the various buckets.
You can always choose to return the narrative to a standard bar chart narrative by going back into the narrative settings and describing the data as "Discrete".
Making histograms in Qlik Sense
As opposed to standard bar charts where you will want to see a measure across a set of discrete entities (i.e., revenue by product), a histogram allows you to examine how many of those individual entities fall into certain buckets. The example in this guide will look at an employee salary histogram. As opposed to listing out every employee and their salary, the histogram will see how many employees fall into certain 'salary ranges'.
In the chart above, you can see how many employees have salaries in each of these ranges. For example, two employees have a salary between $47,500-$48,000.
Creating Histogram Buckets in Qlik Sense
In order to create those buckets, you can use a custom Qlik 'expression' for our dimension.
Here, we are taking the measure 'Year Salary' and breaking it into buckets of 500. The last argument in this expression is what we want to appear on the x-axis (in this case, 'Salary ($)').
Our measure will just be the count of unique employees. In our case the Count of EmployeeIDs that fall into those ranges.
Generating Narratives about Histograms
Once we've set up our histogram, we can bring a narrative into our worksheet and generate a narrative like we normally would. When we request the narrative, we will see our walkthrough window appear if we've chosen to see it upon each new narrative. In addition, the narrative object will prompt that the N4Q extension believes the narrative is about a histogram.
Next, we'll choose "Histogram" to describe our data
When you click "Next', you can customize how the narrative will refer to these 'histogram buckets'. In this case, we will refer to them as 'salary ranges'.
Once we click 'Save and Close', we will have our histogram narrative.