Qlik Sense: Using Drilldown in Narratives
Documentation for Arria NLG’s Extension for Qlik Sense Desktop
This documentation is organized as follows:
- Overview of drilldown narratives
- Configuring a drilldown narrative
- Modifying the Studio project for the drilldown
- Other documentation for Arria’s extension to Qlik Sense
Drilldown — an important and oft-used feature in BI dashboards — allows users to navigate to a different layer of data granularity by clicking a control on a visualization. When a dimension of a dataset contains a hierarchy, you can drill down to reveal additional details. This lets you view aggregated, summary data and then hierarchically explore deeper levels of the data for more specific analysis.
The drilldown feature of Arria’s extension for Qlik Sense offers narratives at different levels of data granularity. For example, you have a sales dataset with a location as a dimension. You want to look at sales by a hierarchy made up of country, state, and city. Initially, you want to describe sales performance by country and let users drill down into the state and city levels as they wish. The narrative changes its reporting granularity to follow along with the users’ drilldowns.
The examples below show a narrative that describes drivers of expense variance at an aggregated level (Account Level 2) alongside a bar chart with drilldown.
After drilling down, the example below shows the narrative describing drivers of expense variance at a more detailed level (Account Level 4) and the corresponding chart with its drilled-into detailed level.
Note: You can configure up to four drilldown levels within the Arria widget.
This example for configuring a drilldown narrative uses a version of a Qlik Sense project that looks at expenditures.
1. Download this Qlik Sense project, open it in Qlik Sense, and then in the dashboard where it says Select Two Fiscal Periods, select 2017-Q3 and 2017-Q4.
2. In NLG Studio, import this sample drilldown Studio project.
3. In NLG Studio, publish the project, then:
a. Make note of the URL.
b. Generate the API key and make note of it.
Note: See Creating your own narrative for details of how to publish a Studio project.
4. Configure the Arria widget with the URL and API key of the NLG Studio project.
5. Click Generate Text. You should see the narrative generated, but note that there is no drilldown control.
6. Now let’s configure the drilldown control. In this case, we’ll configure an account hierarchy using the drilldown elements that you need in your narrative. With the Arria widget selected within the dashboard, in the Assistance section of Qlik Sense, click Appearance and then expand Drill down filter 1.
7. In the configuration for Drill down filter 1, enter the following:
a. In the Key field, enter
b. In the Label field, enter
c. In the Drill Down Fields field, enter
Level 3, and
Level 4 (commas but no spaces).
Once you have done the above configuration for the drilldown, the Arria extension creates a drop-down with the selected columns of the configured table representing the account hierarchy.
Note: While you can now see the drilldown control element added to the widget, when you use it to make different selections, your selections will have no bearing on the narrative generated.
At run time, the selected value within the drop-down is passed to the API. The information is embedded in the BI data format as shown below:
"accountLevel": "Level 2"
This passed value needs to be used within the project in NLG Studio. Let’s go back to the project in Studio.
8. In Qlik Sense, in the Arria widget, click the cog.
9. Click the Open with Studio button to go back to your Studio project.
Now you can access the value in the narrative script as shown below and assign that to a variable:
1. In NLG Studio, look at the Main script.
2. In the Compose view, in the Main script, change the first line:
3. Re-publish the project.
With this edit you have made, the
accountLevel variable in your narrative script will now be used to access the dashboard user’s selected level with the account hierarchy.
4. In Qlik Sense, try selecting different drilldown levels to see how the narrative changes.
For more information, see: