HierarchyFilter icon - create hierarchies, browse your hierarchies and use them as a filter in your Tableau dashboards

Product Guide

visualize, browse and interact with your hierarchies

The HierarchyFilter extension can interact with your dashboard through parameters that can be used in calculations, filters, and set/parameter actions. It also allows you to set a filter that can be used to limit the data in the hierarchy to the current node and all child nodes and mark selections of selected nodes and child nodes.

Supported data structures

It is important to know that the HierarchyFilter extension supports two different data models to visualize and interact with your hierarchy dataset. Both datamodels require a different approach in configuring the HIerarchyFilter extension. This Product Guide will elaborate on both data models/structures.

  1. Dimensional data. The hierarchy is based on the dimensions in your dataset. An example of this model is the Product Structure in the SuperStore demo dataset of Tableau (Category >> Sub-Category >> Manufacturer >> Product Name)

  2. Hierarchical data. The data structure you will often find in organization structures and consists of a Parent-Child relationship.

Dimensional dataset

As indicated above, the HierarchyFilter supports a Dimensional dataset. In this example, we use Product structure from the SuperStore dataset which is already available as a hierarchy. The image shows an example of the Product structure hierarchy in the SuperStore dataset. The dimensions are available on a row level in your data.

HierarchyFilter dataset dimensional model

Global overview for dimensional datamodel

When working with a dimensional dataset, the global process of getting started with the HierarchyFilter extension for Tableau consists of the steps listed below. After this summary, we will explain each step.

  1. Create your hierarchy datasheet
  2. Define your hierarchy structure
  3. Create parameters for extra dashboard interactivity
  4. Configure the extension
  5. Hide your hierarchy datasheet
  6. Interact with your dashboard

Create your hierarchy datasheet

It is not necessary to have your data source structured in Tableau Hierarchies! The image shows an example of the Product structure hierarchy in the SuperStore dataset, you can also use your dimensional dataset of course without setting up a Tableau Hierarchy upfront. The dimensions are available on a row level in your data, just add them to your hierarchy datasheet as shown in the example. Don’t worry about formatting, this sheet is necessary on your dashboard but will be hidden once we set up the extension properly.

HierarchyFilter dataset dimensional model

Create your hierarchy structure in a calculated field

Our existing SuperStore Product structure is already organized in a Tableau hierarchy. It is not necessary to use a Tableau hierarchy upfront, we will be creating our own structure that will feed the extension in a calculated field. To do so create a calculated field as type “String” that consists of all dimensions you want to be part of the hierarchy, separated by a separator (we use the pipe symbol | in our example). The structure of the calculated field is shown in the image (click to enlarge).

HierarchyFilter dataset dimensional model

Add the hierarchy calculated field to your datasheet

The last step to complete the datasheet is adding the calculated field (in this example Product-ID) to the details of the Marks pane like shown in the image below.

Add the calculated field to the details of ytour marks pane in the hierarchy datasheet

Create parameters to support advanced interactions

The HierarchyFilter extension allows you to set values of parameters based on selections made in the HierarchyFilter extension. This way you can create advanced interactivity between the HierarchyFilter and the Tableau sheets and visualizations in your dashboard. This is not a mandatory step but optional if you want advanced interactivity where parameters can be part of your calculations to filter or focus on the selections in your HiertarchyFilter.

  1. Creating these parameters is bound to some simple syntax structures:For every dimension that is part of your hierarchy structure as designed in your calculated field (e.g. Category – Sub-Category – Manufacturer – Product Name), create a parameter of type string and add an identical suffix to all your parameters that are related to the HierarchyFilter. In this example, we used the suffix “Param” for all the parameters that we need for the HierarchyFilter.
  2. Create two extra parameters
    1. “Label Param” of type String, this will store the label of the selected node in your HierarchyFilter
    2. “Level Param” of type Integer, will store the level in your Hierarchy of the selected node

Below are two examples of the String and Integer parameters we created.

Create a String parameter per dimension and use a fixed Suffix in the Parameter name
Create a Integer parameter per dimension and use a fixed Suffix in the Parameter name

Overview of parameters created in this example

Now we’re all set. In our example we have created the parameters as shown in the image below.

HierarchyFilter overview of parameters for example

Create a dashboard containing your datasheet and the HierarchyFilter extension

The next step is to create your dashboard with the HierarchyFilter. Create a new dashboard and add your hierarchy datasheet to the dashboard. This sheet contains the data that will feed the HierarchyFilter extension and makes the magic happen. You can also add some other Tableau visualization sheets to the dashboard based on the same data source. This way you can use the interactivity of the HierrchyFilter extension.

Now add the HierarchyFilter extension to the dashboard (use the trial Trex file or a Trex matching a purchased subscription). Your Dashboard should look something like the image below.

HierarchyFilter - start situation demo dashboard

Configure the HierarchyFilter

So we managed to prepare our datasheet for the dimensional data model with the Hierarchy structure we want to use. We also set up a dashboard containing the HierarchyFilter extension. The next thing we need to do is configure the extension to use/visualize the hierarchy and make the dashboard interactive.

To enter the configuration screen, select the container of the HierarchyFilter extension and from the dropdown context menu select “Configure” as shown in the below image (click to enlarge).

Configure the HierarchyFilter extension for Tableau

Configuration wizard

A configuration menu will pop up. The configuration consists of wizard-like steps, indicated at the top of the screen. This is shown in the example below.

Configure the HierarchyFilter extension for Tableau