Understanding Time Intelligence in DAX
What Is Time Intelligence?
Time intelligence refers to calculations that analyze data across different periods, such as days, months, quarters, and years.
These calculations help answer questions such as:
- How much revenue have we generated so far this year?
- How did this quarter compare with the previous quarter?
- What was the total revenue during the previous year?
- How much did sales increase compared with last year?
Power BI provides DAX functions designed to support these calculations.
Requirements for Time Intelligence
Before using time intelligence, ensure that your model contains a suitable date table.
A date table should generally:
- Contain one row per date.
- Include unique, nonblank dates.
- Cover the relevant reporting periods.
- Have a suitable relationship with the fact table's date column.
- Be marked as a date table when required by the time-intelligence approach.
For example, a Calendar table containing a continuous sequence of dates can be connected to the Sales table through its order date.
Using a dedicated date table helps provide consistent results across time-based calculations.
Year-to-Date Sales
Year-to-date (YTD) sales calculates the total sales from the beginning of the year through the current date context.
Sales YTD =
TOTALYTD(
[Total Sales],
Calendar[Date]
)
When used in a visual grouped by date, this measure calculates cumulative sales from the start of the relevant year through the date being evaluated.
For example, a report grouped by month can display cumulative sales as the year progresses.
Previous-Year Sales
You can calculate sales for the corresponding period in the previous year using SAMEPERIODLASTYEAR.
Sales Previous Year =
CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR(Calendar[Date])
)
This measure shifts the current date context to the corresponding period one year earlier.
For example, when the current context is March 2026, the calculation can return sales for March 2025.
The result depends on the date context and the availability of relevant dates in the model.
Power BI Tutorial
Vishalini A








