Skip to content

The period decides which records count. Use DURING for a named range, or SINCE and UNTIL for your own.

FROM deals
SHOW won_value
DURING this_quarter
ON won_at
DURING <range>
SINCE <date> [UNTIL <date>]
ON <date field>

Use either DURING or SINCE, not both. With no period, a report covers the last 30 days (TIMESERIES picks a window for its unit instead).

DURING takes a named range:

today, yesterday, this_week, this_month, this_quarter, this_year, last_week, last_month, last_quarter, last_year, last_7_days, last_30_days, last_90_days, last_12_months, all_time.

SINCE -90d
SINCE 2026-01-01 UNTIL 2026-03-31
SINCE startOfMonth(-1m) UNTIL endOfMonth(-1m) -- last month
SINCE this_year UNTIL today

UNTIL defaults to today. With TIMESERIES, UNTIL can stand alone and the start comes from the unit’s default window.

Form Examples Meaning
Relative -7d, -4w, -6m, -1q, -1y Days, weeks, months, quarters, or years ago
Named day today, yesterday, now
Exact date 2026-01-31
Start or end of a period startOfMonth(-1m), endOfQuarter(-1q) See date functions
Range name this_year, last_month In SINCE its first day, in UNTIL its last day

By default the period applies to the date each record was created. ON picks another date field:

FROM deals
SHOW won_value
DURING this_year
ON won_at -- revenue by the day deals were won

Common choices: won_at and close_date on deals, paid_at and issue_date on invoices, start_date on subscriptions, listed_at and sold_at on listings. Orders use the store’s order date when they have one.

Add WITH TIMEZONE 'America/New_York' to read “today”, “this month” and date functions in a specific time zone. See WITH.