You need to enable JavaScript to run this app.
DataAgent (OnPremise)

DataAgent (OnPremise)

Copy page
Download PDF
Data Source Configuration
Date Filtering
Copy page
Download PDF
Date Filtering

This article introduces various ways to filter datasets by date.

Quick start
  1. Click "Filter configuration" to enter the dataset filter configuration interface, then click "Add" to set the filter conditions for the dataset metric fields used by the agent.
    Image
  2. For date-type fields, multiple methods are provided, including "dynamic date filtering," "fixed date filtering," "advanced filtering," "special value filtering," and "single date filtering." Set the relevant filtering parameters according to actual data requirements, then click "Confirm" to execute the filtering.
    Image

Application scenarios

Date filtering methods

Applicable scenarios

Dynamic date filtering

Date range changes continuously over time

Fixed date filtering

Fixed date range, does not change over time

Special value filtering

Supports filtering date data based on three methods: empty date, non-empty date, and all dates

Advanced filtering

Set the start and end times as fixed or dynamic separately to flexibly define the date range for filtering

warning

Advanced filtering is supported only when the date granularity is "Year-Month-Day", that is, when viewing filtered data at the day granularity.

Single date

Only one day can be selected at a time

Feature overview

Switch date granularity

You can switch the date filtering granularity in the upper left corner of the date filter pop-up window. Supported granularities are: year-month-day, year-month, and year-week.
Image

  • Year-month-day: View filtered data by day
  • Year-month: View filtered data by month
  • Year-week: View filtered data by week

Dynamic date filtering

The date range is generated based on user-defined anchor points and changes continuously over time. For example, view the order volume for the past 30 days.
Detailed steps:

  1. Select the date granularity as day, month, or week, then click "Dynamic date."
  2. Set the relevant conditions for "Dynamic date" filtering. You can choose quick date options, customize the date range, or use advanced settings.
  3. Click "Confirm" to complete the data filtering.

Image
The following explains the configuration parameters:

Parameters

Configuration instructions

Date quick options

Based on business scenarios, the system provides preset date quick options such as "Last 1 day", "This month", and more, allowing users to quickly specify filtering conditions.

Custom

If the above quick options do not meet requirements, users can also customize dynamic dates, for example: most recent 1 month.

  • Operator: Recent
  • Date count: Enter a non-zero natural number
  • Date: Day/Natural week/Custom week/Month/Bimonth/Quarter/Half-year/Year
  • Include today: Yes/No

warning

If the operator is "Recent", the product will additionally provide checkboxes to offset the date range by the granularity of the time window. For example, with a date that includes hours, minutes, and seconds, when the granularity is set to "Hour", two checkboxes will appear:

  • Include current hour: Includes the hour in which the current time falls. For instance, if the current time is 19:13:23, selecting "Include current hour" will display data from 19:00:00 to 19:59:59.
  • Full hour: Represents a complete hour. For instance, 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.

Advanced settings

Users can add the following special date conditions in advanced settings, and can choose whether the relationship with the preceding condition is "And" or "Exclude"; the default is "And".

  • Workday: All dates minus Chinese mainland statutory holidays minus non-make-up Saturdays and Sundays
  • Weekend: Saturday and Sunday
  • Holiday: Chinese mainland statutory holidays
  • Trading day: Trading days of the Shanghai and Shenzhen exchanges in the Chinese mainland
  • Beginning of month: The first day of the month, for example, January 1
  • End of month: The last day of the month, for example, January 31
  • Beginning of quarter: The first day of the quarter, for example, January 1
  • End of quarter: The last day of the quarter, for example, March 31
  • Beginning of year: The first day of the year, for example, January 1
  • End of year: The last day of the year, for example, December 31

warning

If "Workdays" are set in "Advanced Settings", when filtering for the most recent days, the time preview may show information that includes non-working days, but in the actual chart, non-working days will not appear. The time preview is for reference only.

Include empty dates

Include dates without corresponding data

Fixed date filtering

Unlike dynamic date filtering, 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 range: 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 hours, minutes, and seconds, you can select the precise time.
Operation steps:

  • Select the start date and end date directly in "Fixed date."

  • The time range selected in "Dynamic date" can be directly used in "Fixed date" for filtering.
    For example: If the current date is 2025-05-29 and "Last month" is selected in dynamic date, then clicking fixed date will automatically select the date range 2025-04-01 to 2025-04-30.

    Selections in dynamic dates

    Click to display fixed date

    Image

    Image

Advanced filtering

Configure the start and end times of the date filter separately to flexibly define the date range for filtering. After selection, you can preview in the time preview section.
For example, if today is 2025-02-28, set the date filter conditions as follows:
Start time: Fixed 2025-02-29
End time: Dynamic, 1 day later
The date will be selected as 2025-05-29 to 2025-05-30; 1 day later, the date will be selected as 2025-05-29 to 2025-06-01, and so on.
Specific operation steps:

  1. Select the date granularity as "Year-Month-Day" and click "Advanced".
  2. Set the start time and end time, and choose advanced settings as needed.
  3. Click "Confirm" to complete data filtering.

Image
Instructions for configuring the operators for start time and operation time are as follows:

Operator

Description

Fixed

Select a fixed date as the start or end time of the filter.

Dynamic

Dynamically select a time point before or after the current time as the start or end time of the filter.

No limit

When used as the start time, the start time is not limited, 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 limited, and all time points greater than or equal to the start time are selected; an unlimited end time allows the end time to be dynamically selected up to the most recent counted time point.

warning

Both the start time and end time cannot be set to unlimited simultaneously; at least one time must be specified.

Special value filtering

Supports filtering date data based on three methods: empty date, non-empty date, and all dates. The default is all dates:

  • Empty date: Filter all data where the date field is empty.
  • Non-empty date: Filter all data where the date field is not empty.
  • All dates: Used to obtain a dataset containing all records, regardless of whether the date is filled in.

Image

Single date filtering

Definition of "single date": Only one day can be selected at a time.
Image

Last updated: 2026.06.02 14:59:33