It’s common to come across Hierarchies when working with categorical data. During my recent placement, I was asked to create a drill-down across non-hierarchical dimensions, the request was to visualise three different dimensions that had a many-to-many relationship and have it filter a crosstab with details, the crosstab would be hidden and only show when a variable from any of the charts above is selected. To recreate this solution, I’ve used the Superstore dataset, Instead of Category, Subcategory and Manufacturer where you can see a definite hierarchy, I used Region, Segment and Category since the relation between them is Many to Many.

To achieve this interactivity, we will use a combination of Sets and Filters. Keeping in mind the tableau order of operation. 

Step 1. 

Create three charts and a crosstab, I have chosen to go with Region, Segment and Category, because of this Many to Many relationships between them.

Step 2. 

Create a Set for each of them and the following calculated field. 

Step 3.

Place this calculated field on the Filters shelf of the Sheet with the Crosstab and exclude Nulls. 

The rest of the magic happens on the dashboard, using dashboard actions. Build your layout, if you want, replicate what you see in step 1 and let’s continue. 

Step 4. 

Create the set action, replicate what you see below for Segment and Region. The key here is to ensure “Remove all values from set” is selected for when the selection is cleared. 

 

Step 5.

Finally, to create that drill down effect between the charts and the crosstab, just use a simple filter action. Important! For this to work, you must Select the respective Source and Target field when creating the filter. Create two more filters for Region and Segment. 

 

And there you have it, Next level drill-down using Sets and filters across non-hierarchical dimensions. You can download a copy of this workbook, here.

Jude Shu
Author: Jude Shu