- 05 Jul 2022
- 2 Minutes to read
- Updated on 05 Jul 2022
- 2 Minutes to read
In this article we will learn how to configure a parent-child filter using the Values are dependent on other filters configuration option.. A parent-child filter is used to create a relationship between filters. This configuration turns an existing filter into a sub-filter of a parent.
Filter Configuration Options
The following configuration options are available for these filter types:
|Value||Numerical Range||Time Range||Time Column||Time Grain|
|Pre-filter available values||✔||✔|
|Sort filter values||✔||✔||✔||✔|
Before we dive into an explanation of a parent-child configuration, we need to do some short preparatory work.
Preparation: Create Two Value Filters
To start, let's create a Value type filter called "Select Platform" that uses the Platform column. For the configuration, just tick the Can select multiple values option in the Filter Settings panel.
After this is all set, go ahead and select Save.
Next, select + Add/Edit Filters — the Add and edit filters window appears.
When you launch the Add and edit filters window, it displays the topmost filter by default. To create another filter, be sure to select + Add filters and dividers and then choose Filter in the sub-menu.
As mentioned above, select + Add filters and dividers and then choose Filter in the sub-menu.
Then create a Value type filter called "Select Genre" that uses the Genre column. Like before, we will select the Can select multiple values option in the Filter Settings panel.
When done, select Save. Great job!
Now, let's have a closer look at how each configuration option works.
Create a Parent-Child Filter Relationship
This option is used to turn a filter into a sub-filter of an existing filter. In this example, we will make the Genre filter a sub-filter of the Platform filter (i.e., the Platform filter becomes a parent).
The idea is to allow users to first select one or more gaming platforms, and then refine their filter further by prompting them to select one or more genres within the selected platform.
To start, select the Select Genre filter and, in the Filter Configuration panel, select Values are dependent on other filters.
After doing this, a Values Dependent On drop-down menu appears — now go ahead and select Select Platform as the parent filter and then select Save.
If you have a look at the dashboard's filter section, you'll notice that the number of available options are displayed in each drop-down field. In the graphic below, there are 31 platform options and 12 genre options:
Recall that our parent filter is Select Platform, so let's go ahead and select 3DO. After doing so, the Select Genre field updates automatically to display only those genres that are supported in the defined platform — in this case, the 3DO platform only supports 3 genres:
Let's go ahead and select the 3 available genres—remember the Can select multiple values option enables us to select more than one option—and then select Apply Filters.
Here's a look at a dashboard table displaying results that match the defined criteria:
Parent-child filters like this are useful because they enable users to easily drill-down and refine their data by creating a relationship between more than one filter.