Configure Query Control Cascade

Updated at:
Copy as MD

Configure conditional cascade to link query controls so that a selection in one control filters the options available in another.

Prerequisites

Background information

Conditional cascade links query controls that use the same or different datasets.

  • If query controls use different datasets, select non-homologous cascade.

  • If all query controls use the same dataset, you can choose either homologous or non-homologous cascade.

    Note

    For the same data source, homologous cascade is simpler and produces the same result.

  • To cascade multiple date query controls, select date cascade.

Limits

  • Supported cascade and filter types:

    Cascade configuration item

    Supported filter types

    Homologous cascade configuration

    Dropdown list and sourced from a single dataset

    Tree drop

    Date selection and sourced from dataset field

    Non-homologous cascade configuration

    Dropdown list and sourced from a single dataset

    Date selection and sourced from dataset field

    Date cascade configuration

    Date selection

  • Each cascade configuration supports up to 5 conditions. For more, create additional cascades.

Notes

  • Upper-level controls can cascade to lower levels. Same-level controls can cascade between each other but not in reverse.

    Note
    • Hierarchy: Global control > Tab query control > Chart query control. A Global control can cascade to Tab and Chart controls. A Tab control can cascade to Chart controls but not to Global controls. Chart controls can cascade only within their own level.

    • Reverse cascade is not supported. For example, if area cascades to product type, product type cannot cascade back to area.

  • If identical fields exist under different controls, select Show Title and rename the control to differentiate them.

    image

  • Hiding a query condition clears its cascade configuration, except when hiding the first level, which retains the configuration.

  • If you hide the first level in query conditions:

    • If the first level has a default value, sub-level options are filtered based on that default value.

      For example, if the cascade is Area Province City District and Area defaults to East China, City and District options come from the Province under East China.

    • If the first level has no default value but uses a global parameter, the global parameter value applies.

    • If the first level has no default value and no global parameter, hiding it removes the condition and all values appear in sub-levels.

      46.gif

    • If both a default value and a global parameter are set, the global parameter overrides the default value.

Associate query controls

  • Dropdown list sourced from a single dataset supports both homologous cascade and non-homologous cascade.

    image

  • Select Date sourced from a dataset field supports both same-source cascade and different-source cascade.

    Note

    Date conditions can also cascade with dropdown or tree drop controls using homologous or non-homologous cascade.

    image

  • Tree Drop supports homologous cascade with controls that share the same dataset.

    image

  • Date selection supports date cascade to link date controls.

    Note

    Multiple date controls without a dataset source can cascade directly with each other, but not with dropdown or text-type controls.

    image

Procedure

  1. On the dashboard editing page, open the conditional cascade page as shown below.

    image

    Alternatively, click conditional cascade in the Query Condition Settings panel.

    image

    The Conditional Cascade Configuration page appears.

    image

  2. Configure conditional cascade.

    • If all query controls use the same dataset, choose homologous configuration.

    • If query controls use different datasets, select non-homologous configuration.

    • For Date selection controls:

      • If multiple date controls have no dataset source selected, configure their cascade using Date Cascade in the Date Query Control Cascade Configuration section below.

      • A single date control with dropdown or text-type controls supports homologous or non-homologous cascade.

Configure conditional cascade relationship (homologous configuration)

Example: Control A has area and province fields, Control B has city and product category fields, and both use the same dataset. Linking the area field in Control A to the city field in Control B filters Control B to show only cities within the selected area.

  1. On the Conditional Cascade Configuration page, click Add New Cascade Configuration -> Homologous Cascade or select Switch To Homologous Cascade.

    image

    • Add New Homologous Cascade Configuration adds a new cascade without changing existing ones.

    • Switch To Homologous Cascade replaces the existing cascade. This action is irreversible.

  2. Select the target field Area in Query Control A and click the Add icon.

    image

  3. Select the condition field City that needs to be cascaded with the target field.

    image

  4. Click Confirm.

    Now, when you select Area as Northwest in Query Control A, only cities within the Northwest area will be available in Query Control B's City field.

    Untitled.gif

Configure conditional cascade relationship (non-homologous configuration)

Example: Control A has region and product type fields, Control B has province and product subcategory fields, and they use different datasets. Linking the region field in Control A to the province field in Control B filters provinces based on the selected region.

  1. On the Conditional Cascade Configuration page, in the Cascade Configuration Item area, select the target field Region and click the Add icon.

    image

  2. In the cascade configuration box, complete the following:

    1. Select the condition field Region that needs to be cascaded with the target field.

      If multiple Provinces fields appear, select the one associated with the target control.

      image

    2. Select the associate field.

      • The associate field must be in the dataset that receives values from the upper-level condition. For example, if region cascades to province, select the field that receives the Region value.

        image

      • The associate field can be a Dimension, Expression Value Placeholder, or Value Placeholder. Placeholder value-passing logic:

        Query control type

        Query method

        Value placeholder

        Expression placeholder

        Date filter

        Single time:

        e.g., 2024-05-28

        2024-05-28

        >=2024-05-28,<=2024-05-28

        Time interval:

        2024.05.28~2024.05.28

        2024-05-28

        >=2024-05-28,<=2024-05-28

        Time interval:

        2024.05.21~2024.05.28

        2024-05-21

        >=2024-05-21, <=2024-05-28

        Text filter

        Single selection: East China

        East China

        in East China

        Multiple selection: East China, South China, Northeast

        East China, South China, Northeast

        in East China, South China, Northeast

        Note

        For time intervals, the Value Placeholder defaults to the start time. To use the end time, specify it in the dataset query, for example: report_date < '$val{report_date_ph.get(1)}'.

        Usage details are available in the Placeholder documentation.

  3. (Optional)

    To associate additional query conditions, click Add New Cascade Configuration and repeat the previous steps.

    image

  4. Click Confirm.

    Selecting Region as Northeast in Control A now filters Control B's Province field to show only Northeast provinces.

    image

Date Query Control Cascade Configuration

Date cascade

Example: Control-Date has quarter and month fields. Linking these fields creates a date cascade, so selecting Q1 2023 limits the month control to January, February, and March.

  1. On the Conditional Cascade Configuration page, click Add New Cascade Configuration and select Date Cascade.

    image

    Note

    Date cascade supports only date-type controls. Supported granularities: year, year-quarter, year-month, year-week, year-month-day, and year-month-day-hour-minute-second.

  2. Select the target field Quarter in Control-Date and click the Add icon.

    image

  3. Select the condition field Month that needs to be cascaded with the target field.

    image

  4. Click Confirm.

    Selecting the first quarter of 2023 now limits the month filter to January through March 2023.

    image

Cascade between date controls and other controls

Date controls can cascade with dropdown lists only when the date control's data source is a dataset field.

  • Example: Homologous cascade with a date control

    1. On the Conditional Cascade Configuration page, click Add New Cascade Configuration -> Homologous Cascade or select Switch To Homologous Cascade.

      image

      • Add New Homologous Cascade Configuration adds a new cascade without changing existing ones.

      • Switch To Homologous Cascade replaces the existing cascade. This action is irreversible.

    2. Select the target field Transport Date in Control C and click the Add icon.

      image

    3. Select the condition field Area that needs to be cascaded with the target field.

      image

    4. Click Confirm.

      Selecting Date as 2023-04-01 filters Area to show only areas with data on that date.

      image

  • Example: Non-homologous cascade with a date control

    1. On the Conditional Cascade Configuration page, click Add New Cascade Configuration -> Non-homologous Cascade.

      image

    2. In the Conditional Cascade Configuration page's Cascade Configuration Item area, select the target field Promotion Activity in Control D and click the Add icon.

      image

    3. In the cascade configuration box, complete the following:

      1. Select the condition field Date that will be cascaded with the target field.

        If multiple Dates fields appear, select the one associated with the target control.

        image

      2. Select the associate field.

        Note

        The associate field must receive values from the upper-level condition. For example, if Promotion Activity cascades to Date, select the Promotion Activity field that receives the passed value.

        image

    4. Click Confirm.

      Selecting Promotion Activity as Spring Festival Activity filters the date control to show only associated dates.

      image

      Note

      When other controls cascade to a date control, the selectable date range covers all dates associated with the selected value in the dataset.

      For example, if the dataset has Spring Festival Activity entries on 2024-02-05, 2024-02-10, and 2024-02-17, the selectable range spans 2024-02-05 to 2024-02-17.

Modify conditional cascade configuration

To modify an existing cascade configuration:

  • Rename a cascade configuration item.

    New configurations are named Cascade Configuration Item by default. Click the title to rename.

    image

  • Delete a cascade configuration item.

    Click the Delete icon above a condition to remove it, or click the Delete icon next to the cascade configuration item to delete the entire item.

    image