Skip to main content
Date references let formulas move through time, group dates, and calculate period boundaries.

Use the table’s granularity

Write Date with the grain used by the formula:
Supported grains are Day, Week, Month, Quarter, Half, and Year.

Reference a nearby period

The compact lookup uses the formula’s current Date grain:
At monthly grain, this reads Revenue from the previous month. A positive value moves forward. For an explicit date shift, use dateadd:
Supported units are day, week, month, quarter, half, and year.

Select a fixed period

Select a time window

Use an inclusive range when a calculation spans several periods:
Relative endpoints move with the current period:

Find a period boundary

startofday, startofweek, startofhalf, and startofyear are also available. See Date-truncation functions.

Read part of a date

Week functions include weekday, weeknum, and isoweeknum. See Date-part functions.

Calculate a period end or date difference

Build a date

Formula ranges

Actuals and Forecast also depend on Date. A formula assigned to a formula range must include the Model’s Date grain in its scope.