Tree Filter
Tree Filter, which displays the filtering fields in a tree structure, can filter multiple fields with hierarchical relationships such as "Country-Province-City", "Year-Month-Day", "Company-Department", etc. In the example, to view the order records of stores in a city, the city and store filtering information can be selected through a single tree filter.
Tree filters allow multiple related fields to be placed in the same filter, making the filtering conditions more convenient.
Add Tree Filter
Add a text filter to the dashboard.
- Click New Filter -> Filter to create a new filter, adjust the filter size and position.
- Select the dataset where the filtering field is located, drag in all fields that need to be filtered. The field at the top is the first dimension, and the field at the bottom is the smallest dimension. You can drag the field (red box position) to adjust the hierarchical relationship.
Tip
The tree filter supports the simultaneous use of text, numbers, and time.
Edit Tree Filter
Text filters can be categorized into single-select and multi-select types. Below, we will edit filters according to different filter types.
1. Configure Single-Select Filter Type Tree Filter The single-select filter type indicates that data can only be filtered through one option.
Configure filter default options:
- Dynamic Selection: Dynamically configure the default value of the filter, supporting all, none, custom filter, first, and Nth.
- All: Refers to selecting all options, displaying all data.
- None: Refers to the filter showing without selecting any options, not using any options to filter data, displaying all data.
- Custom Filter: Dynamically set the default value of the filter using expressions.
- First: Refers to selecting the first option in the list, controlled by subsequent dimension information. When selecting
First Dimension
, the default value is the first ofFirst Dimension
, and data is filtered through this option. When selectingMinimum Dimension
, the default value is the first ofMinimum Dimension
, and data is filtered through this option. In the example,First Dimension
is Year andMinimum Dimension
is Store. The first option (First Dimension) is 2019, filtering all order information for 2019. The first option (Minimum Dimension) is Pacific Department Store, and filtering needs to include its parent, so the filtered information is orders from 2019, Beijing, Pacific Department Store. - Nth: Refers to selecting the Nth option in the list, controlled by subsequent dimension information. When selecting
First Dimension
, the default value is the Nth ofFirst Dimension
, and data is filtered through this option. When selectingMinimum Dimension
, the default value is the Nth ofMinimum Dimension
, and data is filtered through this option. In the example,First Dimension
is Year andMinimum Dimension
is Store. The 2nd option (First Dimension) is 2020, filtering all order information for 2020. The 2nd option (Minimum Dimension) is Han Guang Plaza Store, and filtering needs to include its parent, so the filtered information is orders from 2019, Beijing, Han Guang Plaza Store.
- Fixed Selection: Select a specified item in the filter as the default value.
Set the title and display style in the filter style.
2. Configure Multi-select Tree Filter
Dynamic Selection: Dynamically configure the default value of the filter, supporting all, none, custom filter, first, and top N.
- All: Refers to selecting all options, displaying all data.
- None: Refers to the filter displaying without selecting any options, not using any options to filter data, displaying all data.
- Custom Filter: Dynamically set the default value of the filter using expressions.
- First: Refers to selecting the first option in the list, controlled by subsequent dimension information. When selecting the
First Dimension
, the default value is the first of theFirst Dimension
, and data is filtered through this option. When selecting theMinimum Dimension
, the default value is the first of theMinimum Dimension
, and data is filtered through this option. In the example,First Dimension
is Year andMinimum Dimension
is Store, the first option (First Dimension) selected is 2019 and all its sub-items, the first option (Minimum Dimension) is Pacific Department Store, filtering needs to include its parent, so the filtered data is orders from 2019, Beijing, Pacific Department Store. - Top N: Refers to selecting the top N options in the list, controlled by subsequent dimension information. When selecting the
First Dimension
, the default value is the top N of theFirst Dimension
, and data is filtered through these options. When selecting theMinimum Dimension
, the default value is the top N of theMinimum Dimension
, and data is filtered through these options. In the example,First Dimension
is Year andMinimum Dimension
is Store, the top 2 options (First Dimension) selected are 2019 and 2020 and all their sub-items. The top 2 options (Minimum Dimension) are Pacific Department Store and Han Guang Plaza, filtering needs to include their parents, so the filtered data is orders from 2019, Beijing, Pacific Department Store and 2019, Beijing, Han Guang Plaza.
Fixed Options: Select one or more fixed options as the default value for data filtering.
Set the title and display style in the filter style.
Other Configurations
- NULL value hiding: When this option is checked, any NULL values in the filter options will be hidden.
- Empty value hiding: When this option is checked, any empty values in the filter options will be hidden.
- Cascading selection: When this option is checked, it will link parent and child nodes, selecting or deselecting them simultaneously. For example, selecting a parent node will automatically select all its child nodes, and deselecting the parent node will automatically deselect all its child nodes.
- Internal Filter: Controls the content of the filter field.
Tree Filter Related Settings
Tree filter supports the following settings.
- Adjust the hierarchy of filters through Global Settings to make filters interrelated.
- Can be moved to the sidebar section to save canvas space.
- Can set the filter's chart scope.