DAX in Power BI for Data Science & Analytics

Time Intelligence Fundamentals

Learn how DAX works with dates to answer business questions such as year-over-year comparisons, previous periods, and year-to-date performance.

8

Interactive investigations

TIME

Context + comparison

8

Related knowledge checks

Learning Path

Concept 1 of 813%

Time Intelligence Mental Model

Current Date Context

β†’

Time Function

β†’

Comparison / Accumulation

TIME INVESTIGATION 1

Why Time Intelligence Needs a Date Table

Time intelligence depends on having a reliable calendar. A dedicated Date table normally contains a continuous sequence of dates and useful calendar attributes such as year, month and month number.

Dedicated Date Table

Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec

Date

03/15/2026

Year

2026

Month

March

Month No.

3

Calendar Detective

Which part of a Power BI model provides the calendar structure used by time-intelligence calculations?

Time Intelligence in DAX and Power BI

DAX time intelligence allows Power BI analysts to compare business performance across dates and periods. Common analytical questions include previous-year sales, year-over-year growth, previous periods, and year-to-date performance.

DATEADD in DAX

DATEADD shifts the current date context by a specified interval. This makes it useful when a calculation needs to compare the current period with another period.

DATEADD(
Β Β Date[Date],
Β Β -1,
Β Β YEAR
)

SAMEPERIODLASTYEAR

SAMEPERIODLASTYEAR retrieves the corresponding period from the previous year. It is commonly used for year-over-year comparisons.

TOTALYTD

TOTALYTD calculates an accumulated value from the beginning of the year through the current date context.

Why the Date Table Matters

Reliable time intelligence generally depends on a properly structured Date table and an appropriate relationship between the Date table and the fact data. The calendar provides the time context that DAX functions operate against.

What You Learn in This Lesson

  • β€’ Why a dedicated Date table matters
  • β€’ Understanding date filter context
  • β€’ Using DATEADD for time shifting
  • β€’ Using SAMEPERIODLASTYEAR for comparisons
  • β€’ Understanding year-to-date analysis
  • β€’ Predicting time-intelligence results
  • β€’ Debugging date-context problems
  • β€’ Applying time intelligence to business analysis