Filtering is a fundamental part of data analysis. This article introduces multiple methods for performing dimension filtering on data in product charts.
Filter modes | Mode overview |
|---|---|
Exact filtering | Select or search for target values from the predefined options list to filter. |
Conditional filtering | Dynamically filter data using logical operators. |
Manual input | Paste directly or upload a CSV file to filter. |
Subquery | Reference results from other charts as filter criteria. |
The relevant parameter configuration instructions are as follows:
Parameters | Configuration instructions |
|---|---|
Options area | The options list is displayed in the settings panel. You can select by checking boxes, or locate keywords through search and select them in bulk.
|
Option settings | To configure the options list, use the option settings feature. If the settings are unsatisfactory, select "Clear settings".
|
Option sorting | To define the order of options, use the option sorting feature. The following is a description of the option sorting functionality:
|
Select all | Select all options on the current page; can be used with the search function |
Exclude | Implements the inverse selection effect, equivalent to "not in" |
Display as chart filter | After checking "Display as chart filter", you can set the filter name. A dropdown list appears on the right, allowing you to choose the style of the filter control.
|
The following is a detailed explanation of the option configuration functionality:
Option setting types | Note |
|---|---|
Manual input | You can add options by manual input or by uploading a CSV file, replacing the automatically read option list. |
Subquery | Options depend on a dimension field in another chart. warning For performance reasons, it is recommended to keep the number of members below 50,000, that is, the number of members (rows or columns) returned by the subquery should not exceed 50,000. |
From other datasets | From other datasets: Values are taken from other datasets (such as from a dimension table dataset). |
The relevant parameter instructions are as follows:
Parameter | Configuration note |
|---|---|
Operator |
tip The display of operators for array-type fields varies depending on the scenario:
|
Manual input and list selection | Filter items for conditional filtering support both manual input and list selection
|
Display as chart filter | After selecting "Display as chart filter", you can set the filter name. A drop-down list is displayed on the right, allowing you to choose the style of the filter control.
|
The following is an introduction to the operators:
Operator table for string types:
Operator | Actual operation | Example |
|---|---|---|
Contains | like | User input: Beijing, Shanghai.
|
Does not contain | nok like | User input: Beijing, Shanghai.
|
Starts with | like | User input: Bei, Shang.
|
Ends with | like | User input: Bei, Shang.
|
like | like | \ |
not like | not like | \ |
Is null | is null | \ |
Is not null | is not null | \ |
Is an empty string | is empty | \ |
Is not an empty string | is not empty | \ |
For numeric types, the operator list is as follows:
Operator |
|---|
< |
≧ |
≦ |
Range |
Not in range |
Is null |
Is not null |
tip
For numeric fields, the following operators are supported: <, >, =, ≠, ≥, ≤, range, not in range, is null, and is not null.
If "Range" or "Not in range" is selected, you also need to specify whether the range boundaries are open or closed intervals.
Operator | Actual meaning | Example |
|---|---|---|
Contains (ArrayHas) | The target value exists in the array field. | If the user selects value A, it means the array field contains A. |
Does not contain (NotArrayHas) | The target value does not exist in the array field. | If the user selects value A, it means the array field does not contain A. |
Is null |
| This means the entire array field is null. |
Is not null |
| This means the entire array field is not null. |
Users can copy content from Excel and paste it into the text box; the content will be divided into capsules according to the separator below the text box. Alternatively, users can upload a CSV file. Multiple uploads will overwrite previous uploads, with the latter replacing the former.
If illegal characters appear in the content, the capsules will be highlighted in red.
Dimension filtering supports the subquery feature, allowing users to use the query results from other charts as filter criteria for the current chart.
The parameter configuration instructions are as follows:
Parameter | Configuration description |
|---|---|
Select chart | Select a subquery chart.
tip
warning Charts with the following conditions are not supported as subquery charts:
|
Select dimension | Select the subquery dimension field. |
Advanced settings | You can set the maximum number of members allowed in the subquery. warning For performance reasons, it is recommended to keep the number of members below 50,000, that is, the number of members (rows or columns) returned by the subquery should not exceed 50,000. |
Scenario example:
Operational steps:
After checking "Display as chart filter", a dropdown list appears on the right, allowing you to choose the style of the filter control.
Configuration entry: Located in the chart settings area on the left.
Users can adjust the filter layout according to their needs. Two features are provided:
When no subfilter is configured, different filter criteria do not affect each other. For example, in the figure below, "Province" is set to "Shanghai", but all options are still available in the "City" filter.
To make the enumeration values in "City" dependent on the "Province" filter, configure "City" as a subfilter of the "Province" filter.
After configuring the subfilter, only the enumeration values filtered by "Province" will appear in "City".
Click the small arrow on the filter to add an or condition. Drag the dimension into the corresponding position.
After adding, the filter criteria will be in an or relationship.