Calendar-based time intelligence in DAX (preview)

How calendar-based time intelligence in Power BI works, defining calendars with column categories on a date table, retail 4-4-5, 13-month and fiscal calendars, week-to-date with TOTALWTD, sparse dates, DATEADD extension options, TMDL, and the current preview limits.

Short answer: calendar-based time intelligence (preview) lets you define calendars on a table: you tell Power BI which column is the year, the quarter, the month, the week and the date. Time intelligence functions then take the calendar instead of a date column: TOTALYTD ( [Sales], 'Fiscal Calendar' ). It works with any calendar (Gregorian, shifted fiscal, retail 4-4-5, 13-month, lunar), supports week calculations (TOTALWTD), tolerates gaps in dates, and Microsoft names it the recommended approach for its performance and flexibility. Turn it on under Preview features, Enhanced DAX Time Intelligence.

Classic time intelligence assumes the Gregorian calendar, needs every date present, and has no week functions. Retailers with 4-4-5 quarters and 53-week years had to write their own logic for every measure. Calendars move that logic into the model, once.

How do classic and calendar-based differ?

PointClassicCalendar-based (preview)
Input to functionsa date column ('Date'[Date])a calendar ('Fiscal Calendar')
Calendars supportedGregorian, shifted Gregorian (fiscal year end)any: retail 445/454/544, 13-month, lunar
Missing dateserrorallowed (sparse dates)
Week functionsnoneTOTALWTD, DATESWTD, WEEK in DATEADD and DATESINPERIOD
Setupmark as date tabledefine calendars and column categories
Classic against calendar-based time intelligence

How do you define a calendar?

  1. File, Options and settings, Options, Preview features: select Enhanced DAX Time Intelligence, restart Desktop.
  2. Right-click the date table, Calendar options (or Table tools, Calendar options), New calendar.
  3. Name it, then assign columns to categories: for each, a primary column and optional associated columns (for example Month Name as associated to Month).
  4. Fix the validation messages and save.

A calendar can only use columns of its own table, a column can be in one category only, and one table can hold several calendars (Gregorian and Fiscal on the same Date table).

Which categories exist?

CategoryTypeExample values
Yearcomplete2025, 2026
QuartercompleteQ1 2026
MonthcompleteJanuary 2026, 2026 Feb
WeekcompleteW50-2026
Datecomplete12/31/2026
Quarter of YearpartialQ1
Month of YearpartialJanuary, 11
Month of Quarterpartial1, 2, 3
Week of Year, Week of Quarter, Week of MonthpartialW50, 10, 2
Day of Year, Day of Quarter, Day of Month, Day of Weekpartial365, 92, 30, 5
Column categories (from Microsoft's list)

Complete columns identify a period on their own (January 2026); partial ones do not (January). A function needs the categories of its level: TOTALWTD fails on a calendar without a week category.

Columns can also be tagged time-related (for example a working-day flag); their filters are cleared by time intelligence functions except DATEADD and SAMEPERIODLASTYEAR. This is set in TMDL or external tools.

What do the measures look like?

Sales YTD Fiscal = TOTALYTD ( [Sales], 'Fiscal Calendar' )
Sales WTD = TOTALWTD ( [Sales], 'Retail 445' )
Sales MTD 445 = TOTALMTD ( [Sales], 'Retail 445' )
Sales LY 445 = CALCULATE ( [Sales], SAMEPERIODLASTYEAR ( 'Retail 445' ) )
Sales Last 13 Weeks =
CALCULATE ( [Sales], DATESINPERIOD ( 'Retail 445', MAX ( 'Date'[Date] ), -13, WEEK ) )

In TMDL a calendar looks like this (simplified from Microsoft's example):

calendar 'Gregorian'
    calendarColumnGroup = year
        primaryColumn: Year
    calendarColumnGroup = month
        primaryColumn: Month
        associatedColumn: MonthName
    calendarColumnGroup = date
        primaryColumn: Date

How do shifts between months of different length work?

DATEADD with a calendar takes an extension option for shifts into a longer period: with 25 to 28 February selected, a one-month shift gives 25 to 28 March (precise), 25 to 31 March (extended), or with endaligned an end-of-month selection ends at the end of March. A truncation option controls shifts into a shorter period. DATESINPERIOD has PRECISE and ENDALIGNED end behaviour. Microsoft notes IntelliSense does not recognise these parameters yet.

What are the limits of the preview?

From Microsoft's considerations:

  • Calendars cannot be authored in the Power BI service yet, and cannot be used with live-connected or composite models.
  • Do not use auto date/time tables with custom calendars.
  • The table must have fewer than 200 columns; above 20,000 rows validations are not available.
  • Time intelligence functions that use calendars cannot be nested: PREVIOUSDAY ( PREVIOUSMONTH ( 'Calendar' ) ) is not supported; use CALCULATETABLE ( PREVIOUSDAY ( 'Calendar' ), PREVIOUSMONTH ( 'Calendar' ) ).
  • Calculations on a fact table with a calendar and row-level security can give unexpected results.
  • Preview performance is not representative of the final product.

What goes wrong?

  • Missing category. A week function on a calendar without weeks returns an error; add the category.
  • Too many associated columns. Associate only the columns used in time calculations, as Microsoft recommends.
  • Mixing classic and calendar measures. Both can live in one model, but keep one approach per report page so numbers line up.

Where can you check this?

Where do you start?

Turn on the preview in a copy of your model, define a Gregorian calendar on your date table, and rewrite one YTD measure with the calendar. Then try a fiscal or retail calendar. Date table covers the table the calendars sit on.

Keep reading

More from the blog.

Every post

Next

Building this? Say hello.

A question about this post, a pattern you would build differently, or the next thing you want written out: Behnia reads every message.