A compound query control uses nested OR and AND relationships to filter charts based on multiple conditions.
Prerequisites
You are on the dashboard edit page.
Scenarios
Use this control to query across multiple nested conditions, such as the sales volume of a specific product type in a specific region.
Procedure
-
In the left-side navigation pane, click Add Query Control and select Composite Query Control.

-
On the Data tab of the Compound Query Control page, click the following tab:
-
Select a dataset from the Data drop-down list.
-
Click the
icon to go to the dataset editing page, where you can edit dimensions and measures.
-
-
Click Configure Selector and add fields for query.

-
On the Style tab, configure the following settings:
Item
Description
Title and Card
Configure the Title and Content of the widget.
-
Title
Configure whether the control displays a title, and customize the title style.

You can also set a line separator.

-
Component container
Configure Custom Background Fill (①), Fillet (②), and Inner Spacing (③).

Basic Settings
Specify whether to hide the Search button. When hidden, filtering is triggered automatically each time you perform an operation.

Control Style
Set the height of the control and the display mode of the field label.

Field Style
Set the display width of the field.

-
-
Click Configure Selector. In the Configure Selector dialog box that appears, select charts for filter interaction.
NoteThe compound query control supports filter interaction only for charts from the same dataset. Cascade filtering is not supported.

-
In the Configure Selector dialog box, select filter fields.
-
Click Add Filtering Condition to add a filter condition under the current layer.
-
Search for or select a field from the Filtering Field drop-down list, change Field Name, specify Filter By, and set Default Value.
-
If you want to delete a filter condition, click the Delete icon next to the filter condition.
-
-
Click Add Relationship to add a relationship node in the current layer.

-
Click the outer-layer relationship node and select a relationship type as required.

-
If the outer-layer relationship is And, the default inner-layer relationship is Or. If the outer-layer relationship is Or, the default inner-layer relationship is And. The relationship types of adjacent layers are opposite. They can be And-Or, Or-And, And-Or-And, or Or-And-Or.
-
Click the Delete icon next to a node to delete all filter fields and relationships under the node.
NoteYou can add a maximum of three relationships for each node.
-
-
-
Click OK to complete the configuration of the Compound Query Control widget.
Example
-
Text query
Text data can be filtered by using three methods: Enum - Single Choice, Enum - Multiple Choice, and Conditions.
-
Click the Compound Query Control icon. On the Data tab, select a dataset.
-
Click Configure Selector. In the Configure Selector dialog box that appears, select charts for filter interaction.
-
In the Set Filter Conditions section, set filter conditions.
-
Click Add Condition. Select Region as the filter field, Region as the field name, Enumeration-Single Choice as the filter method, and Northeast as the default value.
-
Click Add Condition. Set Filter Field to Order Level, Field Name to Order Level by default, Filter by Condition by default, and Exact Match, Advanced by default.

-
-
Click OK.
-
Click Query in the display area of the Compound Query Control widget. All the charts filtered by the widget are updated.

-
-
Value query
-
Click the Compound Query Control icon. On the Data tab, select a dataset.
-
Click Configure Selector. In the Configure Selector dialog box that appears, select charts for filter interaction.
-
In the Set Filter Conditions section, set filter conditions.
-
Click Add Condition. Set the filter field to Order Amt. The default field name is Order Amt. The default field name is Greater Than, 500.
-
Click Add Condition. Select Profit Amt as the filter field. The default field name is Profit Amt. The default field name is Greater than, 1000.

-
-
Click OK.
-
Click Query in the display area of the Compound Query Control widget. All the charts filtered by the widget are updated.

NoteOnly numeric values can be filtered. Data is displayed based on the aggregation method selected for measures in a chart. For example, if the aggregation method of the order_number field in a cross table is SUM and you use the compound query control to filter data records with order quantities greater than 30, the cross table displays all data records whose order quantity is greater than 30 and aggregation method is SUM.
-
-
Date Query
Filter data within a specific time range by using Shortcut or Filter By Date.
-
Click the Compound Query Control icon. On the Data tab, select a dataset.
-
Click Configure Selector. In the Configure Selector dialog box that appears, select charts for filter interaction.
-
Click Add Filtering Condition to set filter conditions.
NoteTo filter a time range, you must first set the Default Value parameter to Greater Than or Greater Than or Equal Than or Equal To, and then set the Default Value parameter to Less Than or Equal To.
-
Click Add Condition. Select order_date (year) as the filter field, order_date (year) as the default field name, and greater than, 2011 as the default field name.
-
Click Add Condition, select report_date(year) as the filter field, modify the label name to Date, and select Less Than or Equal To, 2016 by default.

-
-
Click OK.
-
Click Query in the display area of the Compound Query Control widget. All the charts filtered by the widget are updated.

-













