Add a query control

更新时间:
复制 MD 格式

You can add a query control to set conditions for filtering your data. This feature is available as an add-on for workbooks in the Enterprise Standard and Advanced editions.

Prerequisites

A workbook is created. For more information, see Create a workbook.

Background

You can configure only one query control per workbook. All conditions are configured within this query control.

Procedure

  1. Go to the workbook editing page.

  2. On the toolbar, click query control.image

  3. In the workbook display area, click the 添加 icon to create a new filter item.image

  4. On the query condition setting page, configure the Name (), Associated charts and fields (), Basic configurations (), Display rule configuration (), and Condition cascading configuration (). image

    Parameter

    Description

    Name

    The default name is Unnamed. You can specify a custom name, such as Area Query or Date Query, to meet your business needs. You can perform the following operations:

    • Click the 添加 icon to add a query condition.

    • Click the 隐藏 icon to hide the current query condition. The configuration is saved, but the condition is hidden from the dashboard.

    • Click the 更多操作 icon to rename or delete the current query condition.

    Associated charts and fields

    Select the charts and fields to associate with the query condition. You can enable intelligent field selection to automatically populate associated fields for the selected charts within the same dataset. If your workbook contains many charts, use the filter to select the required ones.

    Note

    You cannot associate fields of different data types. For example, if you try to associate a date field and a numeric field simultaneously, an error message appears, as shown in the following figure.

    image.png

    Basic configurations

    The basic configuration items vary depending on the data type of the selected field. For more information about the basic configurations for different field types, see Query type configuration overview.

    Display rule configuration

    Set the visibility of the query condition on the sheet. You can set it to Always display, Smart display, or Custom display.

    • Always display: The query condition is displayed on every sheet. This option is selected by default.

    • Smart display: The query condition is displayed only on the sheets that contain the associated charts.

    • Custom display: Select the desired sheets from the Display scope drop-down list. The query condition will then be displayed only on those sheets.image

    Condition cascading configuration

    You can configure cascading relationships between different query conditions. For example, if you select a region in Condition A, Condition B will only show provinces from that region. For detailed instructions, see Configure cascading query controls.

    Note

    For more information about how to configure query conditions, see Create a query control.

  5. Click OK.

    On the query control page, you can view the configured query control and use it to filter data.image

Verify the results

Set area to Northeast and click query. The query results are shown in the following figure.image

Style

You can click the image.png icon on the right side of the query control to configure its style.

image

  • In the Position and layout section, configure whether to Expand all filter conditions by default, the Condition arrangement, Condition position within container, and Spacing between conditions.

    p988385

  • In the Condition box section, configure the Box style, Background color, border radius, and text, and Custom condition style.

    image.png

  • In the Condition name section, configure the Position, Text, and Spacing from box.

    image.png

  • In the Buttons section, configure Button display, Button color, Button radius, and Text style.

    image.png

For detailed configuration instructions, see Configure query control styles.

Remember query conditions

  • You can remember query conditions at the report level.image.png When this option is selected, the system automatically remembers the last-used query conditions.

  • The report-level setting is affected by the organization-level configuration.

    image

    • If Remember query conditions is selected in the Report configuration, the corresponding option on the page is grayed out and cannot be deselected.

    • If Remember query conditions is not selected in the Report configuration, you can enable or disable this feature for each report.