> ## Documentation Index
> Fetch the complete documentation index at: https://support.detrics.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Date Ranges & Time Aggregation

> Control the period your query covers and how it's broken down over time

Two separate settings control time in a Detrics query:

* The **date range** decides which days are included
* The **time aggregation** decides whether those days are summed into one row or broken down by day, week, or month

## Date Range Presets

| Preset                     | Covers                                     |
| -------------------------- | ------------------------------------------ |
| Today                      | The current day                            |
| Yesterday                  | The previous day                           |
| Last 7 / 14 / 30 / 90 days | A rolling window ending today              |
| This week                  | Monday through today                       |
| This month                 | The 1st through today                      |
| This quarter               | The first day of the quarter through today |
| This year                  | January 1st through today                  |

Presets run up to and including today, so the most recent day is usually still incomplete. If you compare against a platform's UI, check whether it includes today the same way.

## Custom Ranges

Besides presets, you can use:

* **Fixed dates**: an exact start and end date
* **Rolling windows**: "last N days / weeks / months / quarters / years", with the option to include or exclude the current (incomplete) period. Excluding it keeps automated reports comparing only complete periods.

## Time Aggregation

| Option      | What you get                                                                |
| ----------- | --------------------------------------------------------------------------- |
| **All**     | One row per dimension combination, with metrics summed over the whole range |
| **Daily**   | A date column is added, one row per day                                     |
| **Weekly**  | One row per week (some platforms also offer US-style weeks starting Sunday) |
| **Monthly** | One row per month                                                           |
| **Hourly**  | One row per hour, on platforms that support it                              |

Availability varies by platform. Most advertising platforms support all, daily, weekly, and monthly; hourly is available on platforms like Meta Ads, Google Ads, and TikTok Ads; some sources (HubSpot, Mailchimp) only support all because their data isn't time-based.

## Unique Metrics Don't Sum Across Periods

Metrics that count unique people, such as **Reach** or **Frequency**, can't be added up across periods. A person reached on Monday and Tuesday counts once in a weekly reach number, but appears in both daily rows.

In practice:

* Summing 30 daily reach rows overstates your real 30-day reach
* To get true reach for a period, query that period with aggregation **All**
* Some platforms limit how long a single reach window can be; Detrics returns an error instead of a wrong number when a range can't be calculated

## Next Steps

<CardGroup cols={2}>
  <Card title="Filters" icon="filter" href="/core-functionality/filters">
    Keep only the rows you care about
  </Card>

  <Card title="Data Freshness" icon="clock" href="/core-functionality/data-freshness">
    Why recent numbers shift, and when data becomes final
  </Card>
</CardGroup>
