All Products
Search
Document Center

Quick BI:Create a Filter Bar

Last Updated:Feb 12, 2025

You can create one or more filters using a filter bar to query data across one or more charts. While multiple filter bars can be created on a dashboard, only one can be pinned to the top.

Prerequisites

A dashboard has been created. For more information, see Create a dashboard and Overview of visualization charts.

Background Information

The Effective mode of filters includes two types:

  • Drag fields to generate filters.

    Drag a field to a filter bar to quickly create a filter. For more information, see Quickly Add Filters.

    Untitled.gif

  • Configure custom filters for fields.

    Customize filters when the default options do not meet your requirements. For more information, see Configure Custom Filters.

    image.png

Quickly Add Filters

Drag a field onto a filter bar to rapidly generate a filter.

  1. In the dashboard edit area, click Add filter bar in the top menu bar and select a filter bar from the list.

    image.png

  2. In the Data section on the right, drag the desired field to the filter bar.

    The system will create a filter bar with a suitable display type based on the field type.

    20.gif

    • If the charts and filter bar on the dashboard share the same dataset, the fields dragged to the filter bar will automatically associate with all charts in that dataset. Newly created charts in the same dataset will also associate automatically.

      image.png

    • If the charts and filter bar on the dashboard use different datasets, the fields dragged to the filter bar will not automatically associate with charts from different datasets.

      image

      To associate charts from different datasets, switch to custom mode.

      image

      For details on configuring filters, see Configure filter bar styles.

  3. Select the desired filter value and click Query.

    image

    Once configured, you can alter the filter bar's style. For details, see Configure filter bar styles.

Configure Custom Filters

This example demonstrates how to add a custom filter with the Effective Mode set to Custom.

  1. In the dashboard edit area, click the filter bar icon in the top menu bar and configure the filter bar.

    • Method 1:

      image.png

    • Method 2:

      image.png

    • Method 3:

      image.png

  2. On the Filter Settings page, complete the following configurations:

    1. Filter

      Click the Filter Condition area and click the 添加 icon to add a new filter condition, named by default as Untitled. Enter a name for the filter condition.

      image

      Note
      • The name is applied immediately after exiting the input field.

      • To hide a filter, click the 隐藏 icon. The hidden filter's configuration is retained but not displayed on the dashboard.

      • Click the 更多操作 icon to rename or delete a filter.

    2. Associated Charts And Fields

      Select the charts and fields to associate. Enable the Field smart selection feature to automatically select associated fields in charts created from the same dataset as the current chart. Use the filter feature to select specific charts if there are many.

      image.png

      Fields of different types cannot be associated simultaneously. For instance, associating both date and numeric fields will result in an error message:

      image.png

    3. Filter Configuration

      Filter configurations vary based on the associated field type. The following describes the configuration for a year granularity of a time field. For other configurations, see the referenced document.image

      Activating the Enable Quick Date Switch feature adds a quick arrow to the date control on the report page, allowing you to swiftly switch years, as shown below.

      Untitled.gif

    4. Cascade Configuration

      For details, see Configure filter bar cascade.

Configure Filter Groups

Create a Filter group to associate multiple filters of the same type, such as Statistics time and Creation time. Use the Switch feature to activate the desired filter.

Procedure

  1. You have configured date selection filters Statistics time and Creation time as shown in the figure below:

    image

  2. Click the Filter conditionsimageCondition group icon to the right of the filter conditions on the left. In the drop-down list, select the desired group.

    image

    Note
    1. Once a filter group is added, you can simply drag individual filters into it.

    2. Within a condition group, only one condition is active at a time. By default, the first condition is the active one. You can switch to select which condition is active in the report. Inactive conditions will remain ineffective, regardless of whether a default value or global parameter is passed in.

  3. You can customize the name of the condition group to Time Query. Once named, you can drag the Statistics Time and Creation Time conditions into the Time Query Condition Group to finalize the group's configuration, as illustrated below.

    查询组

Configuration Effect

After the configuration is complete, you can see that the first condition Creation time in the Time query condition group is enabled by default. You can use the Switch operation to enable the condition Statistics time for queries.

查询组效果

Filter Type Configuration Display

Filter bars can be applied to parameters, placeholders, and common fields of the same type.

Below are the settings for various display types:

  • Date Selection

    Once you associate a date field with a filter bar, it automatically suggests 'Date selection' as the display type. The 'Time granularity' parameter's value depends on the date field associated. The filter bar supports multiple time granularities, including Year, Year-quarter, Year-month, Year-week, Year-month-day, Year-month-day-hour-minute-second, Hour, Hour-minute, and Hour-minute-second.

    In this example, the chosen Time Granularity is Year. When you configure the filter to Year Range, available range options are Starts With, Ends With, Time Range, and Quick Range.

    When filtering by range, the interval types Start With and End With enable you to conduct queries without the need to specify exact start and end times. image

    Custom quick ranges can be configured for different time granularities. The following table shows the mappings.

    Time granularity

    Quick range

    Year

    • Last year

    • Current year

    • Based on yesterday (excluding today)

      • Current year (based on yesterday)

    Year-quarter

    • Current quarter

    • Last quarter

    • Based on yesterday (excluding today)

      • Current quarter (based on yesterday)

      • Current year (based on yesterday)

    Year-month

    • Current month

    • Last month

    • Last 3 months

    • Last 6 months

    • Last 12 months

    • First half of this year

    • Second half of this year

    • Year to last month

    • Year to current month

    • Based on yesterday (excluding today)

      • Current month (based on yesterday)

      • Current quarter (based on yesterday)

      • Current year (based on yesterday)

    Year-week

    • Current week

    • Last week

    • Based on yesterday (excluding today)

      • Current week (based on yesterday)

      • Current month (based on yesterday)

      • Current quarter (based on yesterday)

      • Current year (based on yesterday)

    Year-month-day

    • Today

    • Yesterday

    • The day before yesterday

    • Year to date

    • Month to date

    • Last 7 days

    • Last 15 days

    • Last 30 days

    • Last 60 days

    • Based on yesterday (excluding today)

      • Current quarter (based on yesterday)

      • Current year (based on yesterday)

    • Last week

    • Last month

    • Recently (excluding today)

      • Last 7 days

      • Last 15 days

      • Last 30 days

      • Last 60 days

    • Based on yesterday (excluding today)

      • Current week

      • Current month

      • Current quarter

      • Current year

    • Nearest day of the week

      • Nearest Monday

      • Nearest Tuesday

      • Nearest Wednesday

      • Nearest Thursday

      • Nearest Friday

      • Nearest Saturday

      • Nearest Sunday

    • Others

      • First day of the month

      • First day of last month

      • Last day of last month

    Time, hour-minute, and minutes and seconds

    Fast range cannot be specified

    For more on date query fields, see date query.

  • Numeric Input Box

    If the associated field is a measure, select No aggregation or another method from the Aggregation method list. The default is Summation.

    Note

    The aggregate query control is not for querying detailed data. In the conditional form, choose different display forms, such as single or combined conditions. To restrict the report previewer to a fixed condition form, select Equals and Lock Filter Conditions.

    image

    For more on numeric filter fields, see Numeric query.

  • Text Input Box

    Similar to a numeric input box, select Conditional Form as Single Condition, Or Condition, or And Condition.不包含

    Setting a default value for the product_sub_type field involves specific rules and SQL syntax, as outlined in the following table:

    Rule

    SQL Syntax

    Exact Match

    product_sub_type='ruler'

    No Match

    product_sub_type!='ruler'

    Contains

    product_sub_type like '%ruler%'

    Does Not Contain

    product_sub_type not like '%ruler%'

    Starts With

    product_sub_type like 'ruler%'

    Ends With

    product_sub_type like '%ruler'

    Is Empty

    product_sub_type is null

    Is Not Empty

    product_sub_type is not null

    Empty Text

    product_sub_type=''

    Non-empty Text

    product_sub_type!=''

    For more on text type fields, see text query.

  • Drop-down List (original Enumeration Filter)

    When the display type is Drop-down List (original Enumeration Filter), the Option Value Source provides selectable filter values. Supported methods include Automatic Parsing, Single Dataset, and Manual Input.

    • With Automatic Parsing, the system parses the values of the selected field in the associated chart area, displaying up to 1,000 values.

      If you choose Filter Method as Multiple Selection and set Query Time to Click Query, you can then select Set Default Filter Value and specify the default value.

      On the Field page, perform the following:

      • Enter a keyword in the search box and click the keyword to add the target field value to the Added list.

      • Click Add All Field Values On The Left to add all values to the Added list.

      • Select values on the left to add them to the Added list.

      • Click Exclude to remove values from the Added list.

        Note
        • Excluding a value when setting the default indicates that the value is excluded in the filter bar's Tile style.

        • If the Tile style is set first and then a value is excluded, the Tile style changes to the exclusion style.

      • Click Clear to remove all values from the Added list.

        image..png

    • When the source of the option value is a Single Dataset, you can choose from any dataset available in the current dashboard space. The optimal dataset is typically the one that the related chart uses as its source. The connection between the chart's associated fields and the single dataset's query value field and display name field is illustrated below. 等级查询_4.2.1

      • Associated Charts And Fields refer to the charts and fields to be associated with the filter conditions.

      • Query Value Field refers to the field in the source dataset of the options that matches the associated field.

      • Display Name Field refers to the field in the source dataset of the options that is used for filtering. This is the field displayed in the filter bar.

        Note
        • When the Display Name Field is the same as the Query Value Field, after you select the Query Value Field, the system automatically fills in the display name field.

        • When the Display Name Field is different from the Query Value Field, you must manually modify the display name field.

      • Sort Field: Sorts based on the selected field. Sorting methods include ascending order, descending order, and custom sorting. When you select custom sorting, you can organize the order of field values by dragging them in the Custom sorting pop-up window.

        Note

        This is an optional setting. If no sort field is selected, the default order in the dataset is used.

        111

      • Query Time: Supports Click To Query and Pre-query.

        • Click To Query: The default value. A conditional query is triggered when the query button is clicked.

        • Pre-query: A new feature introduced in Quick BI v3.12.1. After the dashboard is opened, the content values of the drop-down list are pre-queried. The values displayed in the drop-down list vary based on the configuration of row-level permissions. The default value displayed for each account also varies based on the configuration of row-level permissions.

          Pre-query is suitable for scenarios where the target dataset has row-level permissions configured and the data volume is small. Otherwise, it may affect the overall report loading time.

    • If the option value source is set to Manual Input, you must click the 手工录入 icon on the Manual Input page to manually enter the query value field and display name field:

      • If it is the first time you are manually entering values and the query value is the same as the display name, enter the query value and click OK. The system will automatically fill in the display name.

      • If it is the first time you are manually entering values and the query value differs from the display name, you must manually enter both the query value and the display name.

      • If you have previously entered values, you must manually enter both the new query value and the display name. If you enter only the query value, the following error message is displayed:

        image.png

  • Tree Drop-down

    When the display type is Tree Drop-down, you can select datasets from the same dataset or different datasets. The display style supports Tree Display and Tile Display. The filter method supports Single Selection and Multiple Selection. The query time supports Click Query and Pre-query.

    Note

    The tree structure can accommodate a hierarchy of up to 10 levels.

    • Tree single selection display

      树形单选_4.2.1

    • Tree multiple selection display

      多选_4.2.1

    • Quick association is activated by default, allowing for automatic selection of related charts and fields within the same dataset for subordinate levels of a tree structure. To associate charts and fields from other datasets with these levels, you can click Associate Chart within the tree or select a sub-level name from the filter items on the left. 关联图表4.2.1 For instance, if you configure the second level Province for chart and field association, the corresponding fields for the Bar Chart and Pie Chart within the same dataset will be automatically selected. In contrast, the associated fields for the Kanban from a different dataset must be entered manually. 自动载入_4.2.1

    • The Mobile tree drop-down feature includes a clearing function. On mobile devices, you can tap the clear button at each level to remove filter conditions.

      14.gif

Remember Filters

  • Filters can be remembered at the report level. image.png When selected, the system remembers the last filter conditions by default.

  • The report-level settings are affected by the organization-level configuration.

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

      image

    • When Remember query conditions is not selected in Report configuration, you can independently set whether to remember query conditions at the report level based on actual needs. image