Skip to content

General Filters

General filters are the most commonly used type of filters, which query data information by filtering the filter fields. They include:

The general filters introduced in this article are local filters, which only have a filtering effect on the charts within this dashboard and do not affect charts in other dashboards within the app.

Text Filter

In general filters, a filter that uses text fields to screen data is called a text filter. For example, consider the sales situation of a product in national malls. When viewing the sales situation of each city and each mall, it is necessary to filter by city and mall. The filters for city and store are text filters.

Text filters support one (single selection) or multiple screening conditions (multiple selections). Below is a detailed introduction to text filters.

Adding a Text Filter

Follow the steps below to add a text filter in the dashboard.

  1. Click New Filter -> Filter to create a new filter.

  2. Select the data source for the filter, and drag the text field you want to filter into the newly created filter. In the example, the field "City" is dragged in.

  3. Select the filter type and set the Filter Default Value. In the example, the single-select filter type is chosen, with the default value set to "Beijing".

  4. Set the Filter Operator, which is the operation method for the filter options. In the example, two filtering operations are set: include filter options and exclude filter options.

  5. Click the downward arrow on the filter field to rename, sort, or display values for the filter field.

By following the above steps, the text filter setup is completed. For detailed explanations of the filter default values and operators mentioned in the example, please refer to the detailed descriptions below.

Configuring Default Values for Text Filters

After adding a text filter, it is necessary to configure the filter values based on the content displayed in the chart. Text filters are categorized by filter type into single-select and multi-select.

1. Configuring Single-Select Text Filters

Single-select filter type means data can be filtered by only one option. The default value configuration methods include:

  • Dynamic Selection: Dynamically configure the default value of the filter, supporting four options: All, None, First, and Nth. Examples demonstrate the display effect of the filter under dynamic selection.
    • All: Refers to selecting the All option, displaying all data.
    • None: Refers to not selecting any option when the filter is displayed, showing all data.
    • Custom Filter: Dynamically set the default value of the filter using expressions.
    • First: Refers to selecting the first option and filtering data through the first option, displaying the filtered results.
    • Nth: Refers to selecting the Nth option and filtering data through the Nth option, displaying the filtered results.
  • Fixed Selection: Refers to selecting a specified option as the default value.

Filter Style Settings: You can set the title, display style, selected state, etc., in the style. Supports dropdown and tiled styles.

After creating the filter, please test whether it meets the design requirements and satisfies the analytical work needs.

2. Configuring Multi-Select Text Filters

The multi-select filter type allows data filtering through one or more options. The default value configuration methods include:

  • Dynamic Selection: Dynamically configure the default values of the filter, supporting: All, No Options, Custom, First, Top N. Examples demonstrate the display effect of the filter under dynamic selection.
    • All: Refers to selecting all options, displaying all data.
    • No Options: Refers to not selecting any options when the filter is displayed, showing all data.
    • Custom Filter: Dynamically set the default value of the filter using expressions.
    • First: Refers to selecting the first option and filtering data through the first option, displaying the filtered results.
    • Top N: Refers to selecting the top N options and filtering data through the top N options, displaying the filtered results.
  • Fixed Options: Select one or more fixed options as default values and perform data filtering.

After completing the configuration information, you can set the title, display style, selected state, etc., in the style settings. Supports various styles such as dropdown and tiled.

3. Instructions

  1. Enable All Options: This option allows you to quickly toggle the All option in the filter and supports custom text for the All option. The text displayed in the filter selection box will show as "All" or custom text, such as "All Cities", "All Stores", etc.
  2. When a filter is set with a hierarchical relationship with others in the Global Settings, the default value of the child filter will change according to the options of the parent filter. Please refer to the relevant instructions in the Global Settings.
  3. The default value of the filter remains fixed once set.

Filter Operators

Filters support multiple operators for data filtering in different business scenarios.

Single-select type operators include Contains, Does Not Contain, Equals, Does Not Equal, Matches, and Does Not Match.

  • Contains: Filters data information corresponding to the filter option. For example, if "Location" contains "Shanghai", it filters out data where "Location" = "Shanghai".
  • Does Not Contain: Excludes data information corresponding to the filter option. For example, if "Location" does not contain "Shanghai", it filters out data where "Location" ≠ "Shanghai".
  • Matches: Filters data information that matches the filter option. For example, if "Location" matches "Shanghai", it filters out data where "Location" matches "Shanghai", such as "Location" = "Shanghai" or "Location" = "Beijing, Shanghai".
  • Does Not Match: Filters data information that does not match the filter option. For example, if "Location" does not match "Shanghai", it filters out data where "Location" does not match "Shanghai", such as excluding "Location" = "Shanghai" or "Location" = "Beijing, Shanghai".
  • Equals: Functions the same as the Contains operator.
  • Does Not Equal: Functions the same as the Does Not Contain operator.

Multi-select type operators include All Contain, Does Not Contain, All Match (AND), Any Match (OR), Any Equals (OR), and Does Not Equal (AND).

  • All Contain: Includes all data information corresponding to the filter options. For example, if "Location" all contains "Shanghai" and "Beijing", it filters out data where "Location" = "Shanghai" and "Location" = "Beijing".
  • Does Not Contain: Excludes all data information corresponding to the filter options. For example, if "Location" does not contain "Shanghai" and "Beijing", it filters out data where "Location" ≠ "Shanghai" and "Location" ≠ "Beijing".
  • All Match (AND): Filters out data information that matches all filter options. For example, if "Location" all matches "Shanghai" and "Beijing", it filters out data where "Location" matches both "Shanghai" and "Beijing".
  • Any Match (OR): Filters out data information that partially matches the filter options. For example, if "Location" any matches "Shanghai" and "Beijing", it filters out data where "Location" matches "Shanghai" or "Beijing".
  • Any Equals (OR): Functions the same as the All Contain operator.
  • Does Not Equal (AND): Functions the same as the Does Not Contain operator.

Time Filter

In general filters, a filter that uses a time field to screen data is called a time filter. For example, when viewing the sales situation of a product in national malls in 2019, a time filter needs to be added to achieve this.

The time filter can screen information through time points, time ranges, and time periods. Below is a detailed introduction to the time filter.

Adding a Time Filter

Add a time filter to the dashboard.

  1. Click New Filter -> Filter to create a new filter, and adjust the size and position of the filter.
  2. Select the dataset where the filter field is located, and drag the time field you need to filter into the newly created filter.
  3. Adjust the filtering unit of the time filter according to the actual situation, such as year, month, day, etc., and you can also adjust the time display format.

Mobile filter calendar single selection interaction: Single Selection

Mobile filter calendar time range selection interaction: Range Selection

Configuring Default Values for Time Filters

Time filters are categorized by filter type into single selection, time range, and by time period.

1. Configuring Single Selection Type Time Filter

A single selection type time filter refers to filtering data information at a specific point in time. Default value setting methods:

  • No selection: Refers to the filter not selecting any option when displayed, not using any option to filter data, and displaying all data.
  • Today: The default value is set to today, and data is filtered based on today.
  • Yesterday: The default value is set to yesterday, and data is filtered based on yesterday.
  • Custom: Displays data from the previous N days, and selects the field for the previous N days in the filter.
  • Fixed date: The default value is set to a fixed date, and data is filtered based on it.
  • Custom filtering: You can filter dataset field values by writing expressions as the default value for the filter.

Tip

If the time unit is year or month, all options in the single selection will change accordingly with the time unit.

2. Configuring Time Range Filters

A time range filter is used to filter data within a specific time period.

Default value settings:

  • No Selection: The filter does not select any option by default, displaying all data without any filtering.
  • This Year: The default value selects the time range of the current year and filters data within this year.
  • Last Year: The default value selects the time range of the previous year and filters data within that year.
  • Custom: The default value is a custom time range, and data within this custom range is filtered.
  • Fixed Date: The default value is a fixed range, and data within this fixed range is filtered.
  • Custom Filter: You can filter dataset field values by writing expressions to set the default filter value. If the expression result contains multiple values, the maximum and minimum dates are used as the default date range.

For time range filters, when the date field granularity is "day/hour/minute/second," and the default value is set to This Year, This Quarter, This Month, or This Week, the end time can be set to "Current Date T / Current Date T-1 / Last Day of XX."

Filter style settings: You can configure the title, display style, and selected state in the style settings. Both dropdown and tiled styles are supported.

Note

If the time unit is month or day, the units of the time range options will change accordingly. When selecting a date range filter, quick selection of time ranges is supported.

3. Configuring Quick Time Filters

Quick time filters refer to the system providing some quick time periods, allowing users to select the desired quick options based on business scenarios and filter data according to the time period.

Default Value Settings: As shown in the figure, check the time periods provided by the system on the left, and the selection results and default time periods are displayed on the right. Drag the button in the red box 【1】 to adjust the order of filter options;

When users use the quick date filter, checking the option in the red box 【2】 in the previous figure allows users to customize the start and end dates, meeting different users' settings for filter conditions, as shown below.

Filter Style Settings: You can set the title, display style, selected state, etc., in the style settings. Supports dropdown and tiled styles.

Additional Notes on Time Filters

  1. When setting default values for the two filter types of single selection and time range, the time units of the options change according to the settings of the filter field. For example, if the filter field is set to month, the options become this month, last month; if the filter field is set to day, the options become yesterday, today.
  2. When the filter field is set to day (cross-week), day (cross-month), month (cross-year), quarter (cross-year), the time is displayed as text. For example, when the time is set to day (cross-week), the filter options are Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. At this time, the filter types are only single selection and filtering by time period. The default value setting method for single selection refers to the corresponding setting method of Text Filter.

Adding Range Restrictions to the Time Filter Calendar

When data analysts add a date filter to a dashboard, they may want to restrict the time range for user queries to avoid affecting query efficiency and platform resource usage due to excessively large query time spans. There are two ways to limit the query time range: one is to restrict the selectable range of the calendar, with non-selectable dates grayed out; the other is to limit the maximum time interval that users can choose.

Restricting Calendar Filter Range: When enabled, the selectable range of the calendar will be based on the maximum and minimum values of the date field after internal filtering. For example, if the internally filtered range is from 2021 to 2024, then the calendar selectable range will be from 2021 to 2024. This configuration item is not supported when no internal filtering conditions are configured.

Restricting Maximum Selection Range: When enabled, it limits the maximum time interval that users can select.

Numeric Filter

In general filters, a filter that uses numeric fields to screen data is called a numeric filter. For example, when examining the sales situation of a product in national malls, if you want to view orders where the unit price is greater than 1000 yuan, you need to add a numeric filter to achieve this.

The numeric filter supports range, comparison, single selection, and multiple selection to filter information. Below is a detailed introduction to the numeric filter.

Adding a Numeric Filter

Add a numeric filter to the dashboard.

  1. Click New Filter -> Filter to create a new filter, and adjust the size and position of the filter.
  2. Select the dataset where the filter field is located, and drag the numeric field that needs to be filtered into the newly created filter.

Configuring Default Values for Numeric Filters

The filtering types for numeric filters are divided into range, comparison, single selection, and multiple selection.

1. Configuring Numeric Range Filters

A range filter refers to the data information that meets the range of the filtering conditions. This type of setting is relatively simple. The default value only requires setting the start and end positions, supporting manual input of values and dragging the range.

In the style settings, configure the title, display style, selected state, etc. Supports multiple styles such as dropdown and tiled.

2. Configuring Comparison-Type Numeric Filters

Comparison-type filters refer to filtering corresponding data when the filter options meet the comparison conditions. When setting default values, you need to set the comparison type (red box in the figure) and the comparison value (blue box). The comparison types include: not equal to, equal to, greater than or equal to, greater than, less than or equal to, less than, is empty, is not empty. In the style settings, configure the title, display style, selected state, etc. Two display styles are supported.

3. Configuring Single-Select Numeric Filters

A single-select numeric filter refers to filtering data through a single numeric option, where the numeric value is treated as a text type for selection. Please refer to Single-Select Text Filters for filter configuration.

4. Configuring Multi-Select Numeric Filters

Multi-select numeric filters refer to filtering data through one or more numeric options, where the numeric values are treated as text types for selection. Please refer to Multi-Select Text Filters for filter configuration.

Internal Filters

Internal filters refer to adding filters within filters to control the range of values for filter fields. For related usage and settings, please refer to Internal Filters.

General Filter Examples

Example 1

The following figure shows an API monitoring system of a company, displaying API statistics and related information. In the system, API information can be viewed through the creation time of the API (time filter), the call time of the API (time filter), the release status (text filter), and the total number of calls (numeric filter). The example demonstrates querying API statistics for the past six months and APIs with a total number of calls greater than 100.

Example 2

The following image shows an order inquiry system. You can query order information by year (time filter), time period (time filter), store, and order price (numeric filter).

General Filter Settings

General filters support the following settings.

  1. Control the content of the filter fields by adding Internal Filters.
  2. Adjust the hierarchical relationship of filters through Global Settings, making filters interrelated.
  3. Can be moved to the sidebar section to save canvas space.
  4. Can set the Chart Scope for filtering.

HENGSHI SENSE Platform User Manual