You can link filter bars to create dependencies. For example, you can configure a parent filter bar for an area so that a child filter bar displays only the provinces within the selected area. You can also link conditions within the same filter bar. This topic describes how to use a conditional cascade to link filter bars.
Prerequisites
You have created a dashboard. For more information, see Overview and Create a dashboard.
The dashboard contains at least two text query controls or date query controls. For more information, see Text Query Control and date query control.
Background information
A conditional cascade links one or more filter bars. The conditions in these filter bars can be sourced from the same dataset or from different datasets.
If any filter bar in a group uses a different dataset, you must use a cross-source configuration to link them.
If all filter bars in a group use the same dataset, you can use either a same-source or a cross-source configuration.
NoteFor a single dataset, a same-source configuration is simpler to set up and provides the same result as a cross-source configuration.
To link multiple date query controls, you can configure a date cascade.
Limitations
Conditional cascades support same-source, cross-source, and date cascade configurations.
Configuration type
Supported filter type
Same-source configuration
Drop-down list sourced from a single dataset
Tree select
Date selection sourced from a dataset field
Cross-source configuration
Drop-down list sourced from a single dataset
Date selection sourced from a dataset field
Date cascade configuration
Date selection
NoteIn both same-source configuration and cross-source configuration, if the first-level condition is a date type, it can be used in a cascade even if it is not sourced from a dataset.
If the first-level date condition is a default date control and is not sourced from a dataset, its selectable date range is not restricted by the dataset.
If the first-level date condition is sourced from a dataset, its selectable date range is limited to the dates available in that dataset.
A single cascade configuration item supports up to five cascading conditions. If you need more than five conditions, you can configure multiple cascades.
Usage notes
Parent-level conditions can cascade to child-level conditions, and conditions at the same level can cascade to each other. However, reverse cascading from a child to a parent is not supported.
NoteThe hierarchy is as follows: Global filter bars > Tab-level filter bars > Chart-level filter bars. A global filter bar can cascade to other global, tab-level, or chart-level filter bars. A tab-level filter bar can cascade to other tab-level or chart-level filter bars, but not to a global filter bar. A chart-level filter bar can only cascade to other chart-level filter bars.
Reverse cascading is not supported. For example, if you configure an
areafield to cascade to aproduct categoryfield, theproduct categoryfield cannot cascade back to theareafield.
Different filter bars may contain fields with the same name. To distinguish them, select the Control name checkbox and edit the name of the filter bar.

When you hide a filter condition that is part of a cascade, the system retains the cascade configuration only if you hide the first-level condition. In all other cases, the system clears the configuration.
If you hide the first-level condition after setting up a cascade, the following rules apply:
If the first-level condition has a default value, the cascade operates based on that value. The system filters the options in child-level conditions based on the next level down from the default value.
For example, if the cascade is Area > Province > City > County, and the default value for Area is Northeast, the options for City or County then depend on the selection made at the Province level, which is populated with provinces from the Northeast.
If the first-level condition has no default value, it uses the value passed from global parameters.
If the first-level condition has no default value and receives no value from global parameters, hiding it makes the condition inactive. Child-level conditions then display all available values.

If the first-level condition has a default value and also receives a value from global parameters, the value from the global parameters overrides the default value.
Link filter bars
When a filter's display type is Drop-down list and it is sourced from a single dataset, both same-source and cross-source configurations are supported.

When a filter's display type is Date selection and it is sourced from a dataset field, both same-source and cross-source configurations are supported.
NoteYou can configure same-source or cross-source cascades between a date condition and other types, such as a drop-down list or tree select.

When a filter's display type is Tree select, only a same-source configuration is supported. You can configure a cascade with another filter that uses the same dataset as the tree select.

When a filter's display type is Date selection, you can use a date cascade to link date controls.
NoteIf you have multiple date controls that are not sourced from a dataset, you can directly configure a cascade between them. However, you cannot cascade them with text-based controls like a drop-down list.

Procedure
On the dashboard edit page, open the conditional cascade configuration page as shown in the following figure.

Alternatively, in the Set Query Conditions panel, click Conditional Cascade Configuration to open the page.

The Conditional Cascade Configuration page appears.

Configure the conditional cascade.
If all filter bars use the same dataset, use a same-source configuration.
If any filter bar uses a different dataset, you must use a cross-source configuration.
If the filter display type is Date selection:
If you have multiple date controls that are not sourced from a dataset, you can directly configure a cascade between them. For more information, see date cascade.
To link a single date control with a text-based control like a drop-down list, use a same-source or cross-source configuration.
Configure a same-source cascade
Assume you have two filter bars on a dashboard, Filter Bar A and Filter Bar B, that both use the same dataset. Filter Bar A contains the fields area and province, while Filter Bar B contains city and product category. You can link the area field in Filter Bar A to the city field in Filter Bar B. This ensures that when you select an area in Filter Bar A, Filter Bar B displays only the cities within that area.
On the Conditional Cascade Configuration page, click Add Cascade Configuration -> Same-Source Cascade, or select Switch to Same-Source Cascade.

Select Add Same-Source Cascade Configuration to add a new cascade relationship without altering existing ones.
Select Switch to Same-Source Cascade to change the existing cascade relationship. This action cannot be undone.
Select the target field area from Filter Bar A and click the
icon to its right.
Select the condition field city to link with the target field.

Click Confirm and Return.
Now, when you select Northwest for the area in Filter Bar A, the city filter in Filter Bar B will only show cities within the Northwest area.

Configure a cross-source cascade
Assume you have two filter bars, Filter Bar A and Filter Bar B, that source data from different datasets. Filter Bar A contains the fields area and product category, while Filter Bar B contains province and product sub-category. You can link the area field in Filter Bar A to the province field in Filter Bar B. This ensures that when you select an area in Filter Bar A, Filter Bar B displays only the provinces within that area.
In the Cascade Configuration Item section of the Conditional Cascade Configuration page, select the target field area and click the
icon to its right.
In the added configuration box, complete the following settings.
Select the condition field to link with the target field, such as province.
When you select a condition field, the drop-down list may show multiple fields named province. You must select the field from the correct associated filter bar.

Select the associated field.
The selected association field must be the field in the child condition's source dataset that receives the value from the parent condition. For example, if the parent level is
areaand the child level isprovince, the selectedareafield is the one that receives the value from the parent area filter.
The association field supports dimension, expression placeholder, and value placeholder. The logic for passing placeholder values is as follows:
Filter control type
Query method
Value placeholder
Expression placeholder
Date Filter
Single date:
Example: 2024-05-28
2024-05-28
>=2024-05-28, <=2024-05-28
Date range:
2024.05.28 to 2024.05.28
2024-05-28
>=2024-05-28, <=2024-05-28
Date range:
2024.05.21 to 2024.05.28
2024-05-21
>=2024-05-21, <=2024-05-28
Text Filter
Single-select: East China
East China
in ('East China')
Multi-select: East China, South China, Northeast
East China, South China, Northeast
in ('East China', 'South China', 'Northeast')
NoteIn a date range filter where the start and end dates are different (for example, 2024.05.21 to 2024.05.28), the value placeholder passes the start date (2024-05-21) by default. To pass the end date (2024-05-28), you can specify it in the dataset, for example:
report_date < '$val{report_date_ph.get(1)}'.For more information about how to use placeholders, see Placeholders.
(Optional)
If you need to link multiple query conditions between Filter Bar A and Filter Bar B, click Add Cascade Configuration and repeat the previous steps to configure the association.

After the configuration is complete, click Confirm and Return.
Now, when you select Northeast for the area in Filter Bar A, the province filter in Filter Bar B will only show provinces within the Northeast area.

Configure date control cascades
Date cascade
Assume you have a Control-Date filter bar on your dashboard that includes Quarter and Month fields. You can link these two date fields to create a date cascade. For example, if you select 'Q1 2023' for the quarter, the month filter will only show the three months of that quarter.
On the Conditional Cascade Configuration page, click Add Cascade Configuration and select Date Cascade.
NoteIn a date cascade, the available conditions are limited to date-type query controls (both single date and date range are supported). The supported time granularities are Year, Year-Quarter, Year-Month, Year-Week, and Year-Month-Day. Granularities of Hour, Hour-Minute, and Hour-Minute-Second are not supported.
Select the target field Quarter from the Control-Date filter bar and click the
icon to its right.
Select the condition field Month to link with the target field.

Click Confirm and Return.
Now, when you select 'Q1 2023' for the quarter, you can only filter by January, February, or March in the month control.

Cascade date controls with other types
A date query control can cascade with other control types, such as a drop-down list, only when its data source is set to dataset field.
Example: Cascade from a date control to another control type using a same-source configuration
On the Conditional Cascade Configuration page, click Add Cascade Configuration and select Same-Source Cascade, or select Switch to Same-Source Cascade.

Select Add Same-Source Cascade Configuration to add a new cascade relationship without altering existing ones.
Select Switch to Same-Source Cascade to change the existing cascade relationship. This action cannot be undone.
Select the target field transport_date from Filter Bar C and click the
icon to its right.
Select the condition field area to link with the target field.

Click Confirm and Return.
Now, when you select the date 2023-04-01, the area filter will show only the areas corresponding to that date.

Example: Cascade from another control type to a date control using a cross-source configuration
On the Conditional Cascade Configuration page, click Add Cascade Configuration and select Cross-Source Cascade.

In the Cascade Configuration Item section of the Conditional Cascade Configuration page, select the target field promotion_activity from Filter Bar D and click the
icon to its right.
In the added configuration box, complete the following settings.
Select the condition field Date to link with the target field.
When you select a condition field, the drop-down list may show multiple fields named Date. You must select the field from the correct associated filter bar.

Select the associated field.
NoteThe selected association field must be the field in the child condition's source dataset that receives the value from the parent condition. For example, if the parent level is promotion_activity and the child level is Date, the selected promotion_activity field is the one that receives the value from the parent promotion_activity filter.

After the configuration is complete, click Confirm and Return.
Now, when you select Spring Festival Activity for the promotion_activity, you can filter for the dates corresponding to that activity.
NoteWhen another control cascades to a date control, the selectable date range in the date control includes all dates associated with the selected value in the parent control.
For example, if there are three data records for "Spring Festival Activity" on 2024-02-05, 2024-02-10, and 2024-02-17, the selectable date range will be the continuous period from 2024-02-05 to 2024-02-17.
Modify cascade configuration
You can modify a configured conditional cascade in the following ways:
Rename a cascade configuration item.
New cascade configurations are named Cascade Configuration Item by default. You can click the title area to rename it.

Delete a cascade configuration item.
You can click the Delete icon above an added condition to delete only that condition. You can also click the Delete icon to the right of a cascade configuration item to delete the entire item.



























