This topic describes how to use a query control to query data based on a date field.
- A dashboard is created.
- A query control is created on the dashboard. For more information, see Create a query control.
Query the orders within a specific month
- Select the created dashboard. It contains the following chart and query control.
- Click the New filter icon in the query control. In the Query condition setting dialog
box that appears, configure the following parameters:
- Set the query condition name to Monthly query.
- Select Line Chart and the order_date(month) field to associate with the query control.
Note Quick BI selects a time granularity in the right-side Query condition configuration pane based on the date granularity of the associated field. In this example, the field is on a month granularity, so Year-month is selected for Time granularity in the right-side pane.
- Specify the display type, time granularity, filter range, filter method, and interval
- In the Set time filter range section, you can specify the time range within which the data can be queried. After the configuration is complete, the time range that you specified in the query control must be within this range.
- You can set Screening mode to singlemonth or monthInterval and set a default value. In this example, monthInterval is selected and Interval type is set to Time interval.
- If you select Make required, the system starts data query only after all fields in this query condition are specified.
- If Screening mode is set to monthInterval, you can set Interval type to Start at, Ends at, Time interval, or Fast range.
- Fast range is available only for the month and day granularities and allows you to select a time range in the Quick range drop-down list, which is convenient.After Quick range is set, you can select a preconfigured range or click customize on the dashboard. If you select customize, you can manually specify a time range.
- Click OK.
- In the query control, specify the time range that you want to query and click Inquire. The chart to which the query control applies is updated.