Configuring the values of date-based dimensions

This guide explains the different date range modes available when defining date-based dimension values. Each mode provides a different way to capture a time period relative to today or using fixed dates.

Configuring the values of date-based dimensions
This guide explains the different date range modes available when defining date-based dimension values. Each mode provides a different way to capture a time period relative to today or using fixed dates.
  1. Quick Reference
  2. Period Modes
    1. This (current period)
    2. Last (previous period)
    3. Next (following period)
  3. Rolling Modes
    1. All Past
    2. Past N (lookback)
    3. Upcoming N (lookahead)
    4. All Future
  4. Offset Modes
    1. Earlier Than N
    2. Historical
    3. Future
    4. Later Than N
  5. Fixed Modes
    1. Between (date range)
    2. Before (until date)
    3. After (from date)
  6. Custom Expressions
    1. Basic Syntax
    2. Date Anchors
    3. Period Boundaries
    4. Durations
    5. Arithmetic
    6. Fixed Dates
    7. Shortcuts
    8. Expression Examples
    9. Advanced Examples
    10. Tips

Quick Reference

Group Mode Suggested Label Description
Period This "This week" Current calendar period
Last "Last month" Previous calendar period
Next "Next quarter" Following calendar period
Rolling All past "All past" Everything until today
Past N "Past 7 days" Last N units from today
Upcoming N "Upcoming 2 weeks" Next N units from today
All future "All future" Everything from today on
Offset Earlier than "Earlier than 3 months" Before N periods ago
Historical "2-1 months ago" Window in the past
Future "1-2 months ahead" Window in the future
Later than "Later than 1 month" After N periods ahead
Fixed Between "Jan 1 – Mar 31, 2025" Specific date range
Before "Before Jan 1, 2025" Until a specific date
After "After Jan 1, 2025" From a specific date

Need more flexibility? If the predefined modes don't cover your use case, you can write custom expressions using our date range algebra.


Period Modes

Period modes capture complete calendar periods (weeks, months, quarters, or years).

This (current period)

Captures the current calendar period containing today.

This period mode

Examples:

  • "This week" → Monday to Sunday of the current week
  • "This month" → 1st to last day of the current month
  • "This quarter" → Current 3-month quarter (Q1, Q2, Q3, or Q4)
  • "This year" → January 1 to December 31 of the current year

Last (previous period)

Captures the complete calendar period immediately before the current one.

Last period mode

Examples:

  • "Last week" → Monday to Sunday of the previous week
  • "Last month" → Complete previous month
  • "Last quarter" → Previous 3-month quarter
  • "Last year" → Complete previous year

Next (following period)

Captures the complete calendar period immediately after the current one.

Next period mode

Examples:

  • "Next week" → Monday to Sunday of the following week
  • "Next month" → Complete following month
  • "Next quarter" → Following 3-month quarter
  • "Next year" → Complete following year

Rolling Modes

Rolling modes create ranges that automatically adjust as time passes, always relative to today.

All Past

Captures everything from the beginning of time up to and including today.

All past mode

Use case: Show all historical data, completed tasks, or past events.


Past N (lookback)

Captures a specific number of days, weeks, or months looking backward from today.

Past rolling mode

Examples:

  • "Past 7 days" → Last 7 days including today
  • "Past 30 days" → Last 30 days including today
  • "Past 3 months" → Last 3 months from today

Use case: Recent activity, trending data, short-term reports.


Upcoming N (lookahead)

Captures a specific number of days, weeks, or months looking forward from today.

Upcoming rolling mode

Examples:

  • "Upcoming 7 days" → Next 7 days starting from today
  • "Upcoming 2 weeks" → Next 2 weeks from today
  • "Upcoming 3 months" → Next 3 months from today

Use case: Upcoming deadlines, scheduled tasks, near-term planning.


All Future

Captures everything from today onwards into the indefinite future.

All future mode

Use case: Show all upcoming items, future commitments, or planned work.


Offset Modes

Offset modes create windows at a specific distance from today, useful for comparing time periods or analyzing historical/future data.

Earlier Than N

Captures everything before a certain point in the past.

Earlier than offset mode

Examples:

  • "Earlier than 3 months ago" → Everything before 3 months ago
  • "Earlier than 1 year ago" → Everything before last year

Use case: Archival data, old items needing attention, aging analysis.


Historical

Captures a window between two points in the past.

Historical offset mode

Examples:

  • "2-1 months ago" → The period from 2 months ago to 1 month ago
  • "6-3 months ago" → The period from 6 months ago to 3 months ago

Use case: Period-over-period comparisons, historical analysis, trend detection.


Future

Captures a window between two points in the future.

Future rolling mode

Examples:

  • "1-2 months ahead" → The period from 1 month to 2 months in the future
  • "2-4 weeks ahead" → The period from 2 to 4 weeks ahead

Use case: Medium-term planning, future sprints, upcoming milestones.


Later Than N

Captures everything after a certain point in the future.

Later than rolling mode

Examples:

  • "Later than 1 month ahead" → Everything more than 1 month away
  • "Later than 3 months ahead" → Everything more than a quarter away

Use case: Long-term items, distant deadlines, backlog items.


Fixed Modes

Fixed modes use specific calendar dates rather than relative calculations.

Between (date range)

Captures a specific date range with explicit start and end dates.

Between mode

Examples:

  • "Jan 1, 2025 – Mar 31, 2025" → First quarter of 2025
  • "Jul 15, 2025 – Aug 15, 2025" → A specific month-long period

Use case: Fiscal periods, project phases, event windows.


Before (until date)

Captures everything from the beginning of time up to a specific date.

Before mode

Examples:

  • "Before Jan 1, 2025" → Everything before 2025
  • "Before Jul 1, 2025" → Everything before H2 2025

Use case: Legacy items, pre-launch data, historical cutoffs.


After (from date)

Captures everything from a specific date into the indefinite future.

After mode

Examples:

  • "After Jan 1, 2025" → Everything from 2025 onwards
  • "After Jul 1, 2025" → Everything from H2 2025 onwards

Use case: Post-launch data, new initiatives, future-only views.


Custom Expressions

When the predefined modes don't fit your needs, you can write custom date range expressions using a simple algebra. This gives you full control over exactly which dates are included.

Basic Syntax

A date range expression defines a start and end boundary:

<start> ... <end>

The ... operator means the end is exclusive (up to but not including). Use .. for an inclusive end (up to and including).

Date Anchors

These special keywords represent dynamic points in time:

Anchor Meaning
TODAY The current date
BOT Beginning of time (the infinite past)
EOT End of time (the infinite future)

Period Boundaries

Reference the start or end of calendar periods containing today:

Start of... End of... Period
SOD EOD Day
SOW EOW Week
SOM EOM Month
SOQ EOQ Quarter
SOY EOY Year

Examples:

  • SOM .. EOM → This month (inclusive)
  • SOY ... EOY → This year (exclusive of last day)

Durations

Durations follow the ISO 8601 format: P<amount><unit>

Unit Meaning Example
D Days P7D = 7 days
W Weeks P2W = 2 weeks
M Months P3M = 3 months
Y Years P1Y = 1 year

Arithmetic

Combine anchors or period boundaries with durations using + (forward) or - (backward):

Expression Meaning
TODAY - P7D 7 days ago
TODAY + P14D 14 days from now
SOM - P1M Start of last month
SOM + P1M Start of next month
SOQ - P3M Start of previous quarter

Fixed Dates

Use the YYYY-MM-DD format for specific calendar dates:

2025-01-01 ... 2025-03-31

Shortcuts

Two special shortcuts exist for common open-ended ranges:

Shortcut Equivalent Meaning
-BOT BOT ... TODAY All past (everything up to today)
+EOT TODAY ... EOT All future (everything from today)

Expression Examples

Here are examples showing how the predefined modes translate to expressions:

Mode Expression
This week SOW .. EOW
Last month SOM - P1M ... SOM
Next quarter SOQ + P3M ... SOQ + P6M
Past 7 days TODAY - P7D ... TODAY
Upcoming 2 weeks TODAY ... TODAY + P14D
3-1 months ago SOM - P3M ... SOM - P1M
1-2 months ahead SOM + P1M ... SOM + P2M
Before Jan 2025 BOT ... 2025-01-01
After Jul 2025 2025-07-01 ... EOT
Q1 2025 2025-01-01 ... 2025-04-01
All past -BOT
All future +EOT

Advanced Examples

Use Case Expression
Last 3 complete weeks (not including current week) SOW - P3W ... SOW
The month before last SOM - P2M ... SOM - P1M
Next 6 months starting from next month SOM + P1M ... SOM + P7M
Specific fiscal year (Apr 2025 – Mar 2026) 2025-04-01 ... 2026-04-01
Everything older than 1 year BOT ... SOY - P1Y
Everything more than 6 months in the future SOM + P6M ... EOT

Tips

  1. Exclusive vs Inclusive: Use ... (exclusive) for most ranges to avoid overlapping boundaries. Use .. (inclusive) only when you specifically want the end date included.

  2. Period alignment: Use SOW, SOM, SOQ, SOY to align ranges with calendar boundaries. This ensures "last month" means the complete previous month, not "30 days ago."

  3. Consistent units: When building offset ranges, use the same unit for both boundaries (e.g., both in months) for predictable results.

  4. Testing: The expression preview shows the resolved date range, so you can verify your expression captures the intended period.

Go back

Article status changed.

Article status changed.

Article status changed.