Time Intelligence
DAX Time Intelligence
YTD, YoY, and period comparisons across calendar dimensions.
Syntax Definition:
TOTALYTD( Expr, Dates ), SAMEPERIODLASTYEAR( Dates ), DATEADD( ... )
Overview
Time Intelligence functions simplify temporal calculations: Year-to-Date, Month-over-Month, and moving averages.
Architectural Deep Dive
Time intelligence requires a contiguous Date table without missing days marked as a Date table in Power BI. Functions like SAMEPERIODLASTYEAR shift active date filters back 12 months, allowing effortless period comparisons.
Canonical Pattern Example:
Revenue Prior Year =
CALCULATE(
[Total Revenue],
SAMEPERIODLASTYEAR('Date'[Date])
)Common Anti-Patterns & Mistakes to Avoid
- •Running time intelligence functions against Sales[Date] (fact table) instead of a dedicated contiguous Date table.
- •Date gaps breaking the internal VertiPaq calendar mapping.
Interactive Challenge
Put DAX Time Intelligence into practice
Solve "Year-To-Date Revenue" in our interactive Monaco editor with live dataset verification.