You need to enable JavaScript to run this app.
Intelligent Data Insight

Intelligent Data Insight

Copy page
Download PDF
Filter Configuration
Date Filter
Copy page
Download PDF
Date Filter

1. Overview

Filtering is a fundamental step in data analysis. This document describes various methods for filtering chart data by date, as well as the display options for the date filter control.

2. Quick start

How to filter chart data by date?
Step 1: Drag the date field into the "Filter" area and click the field name to open the settings panel.
Image
Step 2: In the left sidebar, select filter mode. The default mode is "Dynamic date".
Image
Step 3: Select the filter criteria.
If you do not need to display the filter control on the chart, simply click "OK" after completing the settings. To display the date filter on the page, check the "As filter" checkbox in the lower left corner of the panel during setup, then click "OK".
Image

3. Feature introduction

3.1 Display the date filter box on the chart

The filter supports configuring the filter control to be displayed on the chart, allowing quick switching of filter criteria during queries. To display the date filter on the page, check the "As time range filter" checkbox in the lower left corner of the panel when configuring the date filter.
Image
As shown below:
Image

3.2 Switch date granularity

You can switch the date filter granularity in the upper left corner of the date filter popup. Supported granularities: year-month-day, year-month, and year-week.

  • Year-Month-Day: View filtered data by day granularity.

Image
Image

  • Year-Month: View filtered data by month granularity.

Image
Image

  • Year-Week: View filtered data by week granularity, and customize the "week calculation logic".

Image
Image

3.3 Dynamic date filtering

The date range generated based on a user-defined anchor point will change over time. For example, view the order volume for the "last 30 days".
Image
The product provides several preset quick options based on business scenarios, allowing users to quickly specify filter criteria.

Quick options

Definition

Example

Note

Past hour

Count back 1 hour from now

This option is only available for partition fields in hour-level synchronized datasets.

Past day

Most recent partition date

This option is only available for partition date fields.

Past 7 days

Most recent 7 partition dates

This option is only available for partition date fields.

Past 14 days

Most recent 14 partition dates

This option is only available for partition date fields.

Past 30 days

Most recent 30 partition dates

This option is only available for partition date fields.

Last day

Yesterday

If today is 2020-02-13, then the last day = 2020-02-12

Last 7 days

The 7 days ending yesterday

If today is 2020-02-13, then the last 7 days = 2020-02-06~2020-02-12

This week

This week

If today is 2023-06-21, then this week = 2023-06-19~2023-06-20

Last week

Last week

If today is 2023-06-21, then last week = 2023-06-12~2023-06-18

Last 14 days

The 14 days ending yesterday

If today is 2020-02-13, then the last 14 days = 2020-01-30~2020-02-12

Last 30 days

The 30 days ending yesterday

If today is 2020-02-13, then the last 30 days = 2020-01-14~2020-02-12

This month

From the first day of this month to yesterday

If today is 2020-02-13, then this month = 2020-02-01~2020-02-12

This bimonth

From the first day of this bimonth to yesterday

If today is 2020-02-13, then this bimonth = 2020-01-01~2020-02-12

Last 3 months

From the first day of the month 2 months ago to yesterday

If today is 2020-02-13, then the last 3 months = 2019-12-01~2020-02-12

Last 6 months

From the first day of the month 5 months ago to yesterday

If today is 2020-02-13, then the last 6 months = 2019-09-01~2020-02-12

Last year / This year

From the first day of this year to yesterday

If today is 2020-02-13, then the last year = 2020-01-01~2020-02-12

Last 2 years

From the first day of last year to yesterday

If today is 2020-02-13, then the last 2 years = 2019-01-01~2020-02-12

Last 365 days

The 365 days ending yesterday

If today is 2020-02-13, then the last 365 days = 2019-02-13~2020-02-12

Last month

From the first day to the last day of last month

If today is 2020-02-13, then last month = 2020-01-01~2020-01-31

Last bimonth

From the first day to the last day of last bimonth

If today is 2020-02-13, then last bimonth = 2019-11-01~2019-12-31

Last year

From the first day to the last day of last year

If today is 2020-02-13, then last year = 2019-01-01~2019-12-31

If the above quick options do not meet requirements, users can also customize dynamic dates.
Image
Note: If you set "workdays" in "Advanced settings", when filtering for the most recent days, the time preview may display preview information that includes rest days. However, in the actual chart, rest days will not appear in the chart. The time preview is for reference only.
In custom scenarios, if the operator is "recent", the product additionally provides checkboxes to adjust the time window granularity for the date range. For a date with "hour, minute, and second", when selecting the granularity as "hour", two checkboxes will appear:

  • Include this hour: Includes the hour in which the current time is located. For example, if the current time is 19:13:23, selecting "Include this hour" will display data from 19:00:00 to 19:59:59.
  • Full hour: Represents a complete hour. For example, if the current time is 19:13:23, selecting "Full hour" will display data from 19:00:00 to 19:59:59. If "Full hour" is not selected, data from 19:13:23 to 20:13:23 will be displayed.

3.4 Fixed date filtering

Compared to dynamic dates, a fixed date range does not change over time. For example, if today is 2020-02-13, set the date filter condition to a fixed date: 2020-02-08 to 2020-02-12. Ten days later, the filter condition remains 2020-02-08 to 2020-02-12. When the date field includes hour, minute, and second, an exact time can be selected.
For partitioned date fields, there will be unselectable dates in the calendar, indicating that this date partition does not exist in the dataset.
Image

  • Passing date range between filters: The time range selected in "dynamic date" can be directly passed to the target filter's "fixed date" for filtering.

Image
Image

3.5 Advanced filtering

Configure the start and end times of the date filter separately to flexibly define the filter date range. After selection, you can preview it in the time preview.
For example, if today is 2020-02-13, set the date filter condition as follows:
Start time: Fixed 2020-01-04
End time: Dynamic 1 day ago
The date will then be selected as 2020-01-04 to 2020-02-12. One day later, the date will be selected as 2020-01-04 to 2020-02-13, and so on.
Fixed
Select a fixed date as the start or end time of the filter. If the date field is p_date (the dataset partition field), only dates with data present in the partition can be selected.
Image
Dynamic
Dynamically select a time point before or after the current time as the start or end time of the filter.
Image
Unrestricted
When used as the start time, the start time is not restricted, and all time points less than or equal to the end time are selected.
When used as the end time, the end time is not restricted, and all time points greater than or equal to the start time are selected. An unrestricted end time allows the end time to be dynamically set to the most recent time point with available data.
Caution: The start time and end time cannot both be set as unrestricted; at least one time must be specified.
Image

3.6 Common scenarios

For example, if an event goes live on June 14, and you need to dynamically view event data during the event period (after June 14), you can configure the date filter as follows to achieve the filtering effect of "2023-06-14 ~ present".
Image
For example, to view event data for the first day of each month and the first day of each quarter from June 11, 2024 to June 11, 2025, you can configure the date filter as follows:
Image

3.7 Special values

Three types of special values can be filtered: empty dates, non-empty dates, and all dates. By default, all dates are selected.
Image

3.8 Single date filter

Definition of "single date": Only one day can be selected at a time.
Image
Caution: When the partition date field is used, a "most recent day with data (1 day)/trading day" checkbox is provided below the calendar. This is mutually exclusive with the calendar above.

3.9 As a time range filter

When the date filter page is set to dynamic date, advanced, special value, or fixed date mode, select the checkbox at the bottom of the panel and click Confirm.
The filter will provide all four modes simultaneously, making it easy to switch between them.
Image

3.10 As a single date filter

When the date filter page is in single date mode, select the checkbox at the lower left of the panel, then click OK. The filter will provide single date mode.

Last updated: 2026.06.11 17:46:23