You can use a filter bar to query data of one or more charts. On a dashboard, you can create multiple filter bars. However, you can pin only one filter bar to the top.

Prerequisites

A dashboard is created. For more information, see Create a dashboard and Overview.

Create a filter bar

  1. Click the Workspace tab. In the left-side navigation pane, click Datasets.
  2. On the Datasets page, find the company_sales_record dataset and click the Create Dashboard icon icon in the Actions column.
    Note If you are using Quick BI Enterprise Standard, you must select Standard or Full Screen. In this example, Standard is selected.
  3. In the menu bar, click the Filter Bar icon icon to create a filter bar.
  4. In the dashboard display area, find the filter bar and click the Filter Bar icon icon. New filter
  5. In the Set Query Conditions dialog box, configure the following parameters:
    1. Query Condition
      When you click the New filter icon next to Query Condition to add a filter, the default name of the filter is Unnamed. You can enter a name for the new filter. Filter name
      Note
      • The name takes effect immediately after you enter the name and move the pointer.
      • You can click the Hide icon to hide a filter. After a filter is hidden, it is no longer displayed on the dashboard but its configuration is retained.
      • You can click the More icon icon to rename or delete a filter.
    2. Associated Charts and Fields
      Select the charts and fields to be associated with the filter bar. You can select Smart Field Selection. This feature automatically selects associated fields in the charts that are created based on the same dataset as the current chart. If a large number of charts exist, select the check boxes next to the charts that you want to associate with the filter bar. Associated Charts and Fields
      Fields of different data types cannot be associated with a filter bar at the same time. For example, you cannot associate a field of the date type and a field of the numeric type with a filter bar at the same time. Error
    3. Query Condition Configuration
      Parameters in the Query Condition Configuration pane vary based on the data type of the associated field. The following figure shows the parameters for a year-granularity time field. For more information, see Configure the display type. Query Condition Configuration
      If you select Set a chart with only the start and end time points associated, left and right arrows appear next to the date picker control on the dashboard. You can click the arrows to change the month, as shown in the following figure. The Alibaba Cloud international site (alibabacloud.com) 3.12.2
    4. Conditional Cascade Configuration
      For more information, see Configure conditional cascade.

Configure the style

After you configure a filter bar, you can set the display style of the filter bar on the Style tab.

  1. In the Basic Configuration section, specify Show title, Global pin, Hide query button, Show Clear Button, Show Reset Button, and Control type.
    Basic Configuration
    Note The Clear and Reset buttons appear in the filter bar only after you select Show Clear Button and Show Reset Button.
    • Reset: indicates that the filter is restored to the default settings.
    • Clear: indicates that the filter is cleared.

    For example, if Filter Bar A is cascaded with Filter Bar B, Filter Bar A is the upper level of Filter Bar B. If Filter Bar A is reset or cleared, Filter Bar B is also reset or cleared. If Filter Bar B is reset or cleared, Filter Bar A does not change.

  2. In the Control style section, specify Control height, Content typography, and Show field labels. Control style
  3. In the Field style section, specify the value style and filter width for each field.
    For the date and numeric fields, you can specify only the filter width. For the text fields, you can also set the value style to Drop-Down or Tile. Expanded filter bar-3.11
    If you select Exclude and add some items to the Added section in the Field pane when you configure filters, the items that you selected are filtered out. 23

Configure the display type

The following content describes the settings of Display Type.
  • Date Selection

    After you associate a date field with a filter bar, Display Type is automatically set to Date Selection, and Granularity is configured based on the date field. Multiple types of granularities are supported, such as Year, Year-Quarter, Year-Month, Year-Week, Year-Month-Day, YYYYMMDD HHMMSS, Hour, Hour-Minute, and Hour-Minute-Second.

    In this example, Granularity is set to Year. If you select Year Interval for Filter Mode, Interval Type can be Start At, End At, Time Interval, or Quick Range.

    If you select Start At or End At for Interval Type, you can query data without the need to enter the complete start time or end time. 1
    You can customize quick ranges for different types of granularities. The following table lists the mappings between granularity types and quick ranges.
    Granularity Quick range
    Year
    • Last Year
    • Current Year
    Year-Quarter
    • Current Quarter
    • Last Quarter
    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-Week
    • Current Week
    • Last Week
    Year-Month-Day
    • Current day
    • Yesterday
    • The Day Before Yesterday
    • Year To Date
    • Month To Date
    • Last 7 Days
    • Last 15 Days
    • Last 30 Days
    • Last 60 Days
    • Last Week
    • Last Month
    • Recently (Excluding the Current Day)
      • Last 7 Days
      • Last 15 Days
      • Last 30 Days
      • Last 60 Days
    • Last Day of the Week
      • Last Monday
      • Last Tuesday
      • Last Wednesday
      • Last Thursday
      • Last Friday
      • Last Saturday
      • Last Sunday
    • Others
      • First Day of This Month
      • First Day of Last Month
      • Last Day of Last Month
    Hour, Hour-Minute, Hour-Minute-Second Quick Range cannot be specified.
    For more information about how to query data based on a date field, see Query data based on a date field.
  • Numeric Input Box
    If the associated field is a measure, you can specify Aggregation Method. The default value is Summation. You can also select No Aggregation or another aggregation method from the drop-down list of Aggregation Method.
    Note If an aggregation method is used in a filter bar, the filter bar cannot be used to query detailed data. You can set Conditional Form to Single Condition, OR, or AND. If you want users to preview a report by using a fixed condition, such as the Equal To condition, select Lock Filter Condition.
    Numeric Input Box
    For more information about how to query data based on a numeric field, see Query data based on a numeric field.
  • Text Input Box
    Similar to Numeric Input Box, you can select Single Condition, OR, or AND for Conditional Form. Not Contain
    The following table describes the mappings between rules and the SQL statements used when you configure default values for the product_sub_type field.
    Rule SQL statement
    Exact Match product_sub_type=‘ruler
    Mismatch product_sub_type!=‘ruler
    Contain product_sub_type like ‘%ruler%’
    Not Contain product_sub_type not like '%ruler%'
    Start With product_sub_type like 'ruler%'
    End With product_sub_type like '%ruler'
    Null product_sub_type is null
    Not Null product_sub_type is not null
    Empty Text product_sub_type=''
    Non-empty Text product_sub_type!=''
    For more information about how to query data based on a text field, see Query data based on a text field.
  • Drop-down List (Formally Enumerated Filter)
    If you select Drop-down List (Formally Enumerated Filter) from the Display Type drop-down list, Option Source can be set to Automatic Parsing, Single Dataset, or Manual Input. Option Source indicates the source of available values of a filter.
    • If you set Option Source to Automatic Parsing, the values of the filter are automatically parsed. A maximum of 1,000 values can be displayed.

      After you set Query Mode to Multiple Choice and set Query Time to Click to Query, you can select Set Filter Defaults and configure the default values.

      In the Field pane, you can perform the following operations:
      • Enter a keyword in the search box and click the field name that appears to add it to the Added section on the right.
      • Click Add all field values on the left to add all the field names to the Added section on the right.
      • Select field names on the left side of the Field page to add them to the Added section on the right.
      • Select Exclude at the bottom of the Added section to exclude the selected field names from the Added section.
        Note
        • If you select a field name and select Exclude on the Field page and then change Field style to Tile, the field name appears on the filter bar. This indicates that the field name is excluded from the query result.
        • If you set Field style to Tile and then select a field name and select Exclude on the Field page, the field name appears with a strikethrough on the filter bar.
      • Click Clear to clear the Added section.
      1
    • If you set Option Source to Single Dataset, you can select a dataset in the workspace to which the current dashboard belongs. We recommend that you select the dataset of the associated chart. The following figure shows the relationships between the associated field, Query Value, and Display Name. Level query 3.12.1
      • Associated Charts and Fields indicates the charts and fields that you want to associate with the filter bar.
      • Query Value is the field in the source dataset that is used to match the associated field.
      • Display Name is the field in the source dataset that is used to filter data. This field appears in the filter bar.
        Note
        • If Display Name is the same as Query Value, the system automatically fills Display Name after you select Query Value.
        • If Display Name is different from Query Value, you must manually change the value of Display Name.
      • Sorting Field: indicates the field that is used to sort data. This parameter is optional. If you do not specify this parameter, the data sequence remains the same as that in the dataset by default.
      • Query Time: supports Click to Query and Pre-query.
        • Click to Query: This is the default value. When you click Inquire on the right side of the filter bar on the preview page, a conditional query is triggered.
        • Pre-query: This mode is supported from Quick BI V3.12.1. If Pre-query is selected, you can select a value from the Order Level drop-down list in the dashboard display area. The values displayed in the drop-down list are determined based on the configuration of row-level permissions. Therefore, the default value that is displayed for each account varies based on the configuration of row-level permissions.

          If the selected dataset is configured with row-level permissions and the amount of data is small, you can set Query Time to Pre-query. In other scenarios, pre-query may prolong the report loading time.

    • If you set Option Source to Manual Input, click the Manual Input icon. On the Manual Input page, enter Query Value and Display Name.
      • If Query Value and Display Name are the same and it is the first time that you manually enter values, you need only to manually specify Query Value. After you click OK, the system automatically fills Display Name.
      • If Query Value and Display Name are different and it is the first time that you manually enter values, you must manually specify Query Value and Display Name.
      • If you have manually entered values, you must manually enter a new query value and display name. If you enter only the query value, the following error message appears. Error
  • Tree Drop
    If you select Tree Drop from the Display Type drop-down list, fields from both the current dataset and another dataset can be selected, Display Form can be set to Tree or Tile, Query Mode can be set to Single Choice or Multiple Choice, and Query Time can be set to Click to Query or Pre-query.
    Figure 1. Example of a chart with Tree display and Single choice
    Tree drop 3.12.1
    Figure 2. Example of a chart with Tree display and Multiple Choice
    1
    Quick association is enabled by default. This feature automatically selects associated charts and fields in the same dataset for sub-levels of a tree structure. Click Associate Chart in the Tree Structure Design section or click the sub-level name of the tree structure in the Query Condition section to associate it with charts and fields in another dataset. Associate Chart 3.12.1The following figure shows the field associations for different types of charts. When you select province as the second level of the tree structure to associate fields with line charts and pie charts that use the same dataset, the system automatically enters the associated fields of Line Chart and Pie Chart. When you associate fields with kanbans that use another dataset, you must manually enter the associated fields for Kanban. Automatic loading