Double layer drill down

The purpose of this blog is to show how to make a double drill down bar chart. I will use the usual Superstore dataset. In essence, I would like to be able to click on one of the category bars and see the subcategory bars and then click on one of the sub-category bars and see the merchants in this subcategory. Visually this is the journey I am aiming for:

Category view
View of all categories
View of all Sub-categories in the Furniture category
View all products in Bookcases Sub-category in the Furniture category

To start with I create a simple bar chart showing the sales per category.

Step 1: Create two parameters.

One for the Categories and one for the Sub-categories and show both of the parameters in the view.

A paramenter for the Category field. 
A parameter for the Sub-category field

Step 2: Create two calculated fields - one for the category and one for the sub-category and drag them on the rows shelf.

Calculated field for the category:

if [Category]=[Parameters].[Category]
then [Sub-Category]
ELSE ''
END

Selected category

Calculated field for the sub-categories:

if [Category]=[Parameters].[Category] and [Selected category]=[Sub-category]
then [Manufacturer]
ELSE ''
END

Step 3: Create an action for changing the category parameter

Select Worksheet from the top menu and click on Actions. A shortcut for this is Ctrl+Shift+A. Add an action and configure it this way:

Action for changing the parameter action on selection. 

Step 4: Create an action for changing the sub-category parameter.

In the source field in the action configuration I select Selected category.

Action for chaning the sub-category parameter

And now we have a fully functioning double-drill bar chart.

Voila!

Author:
Zdravka Bratuhtcheva
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab