BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
There are some wonderful date functions in DAX, with evocative names like TotalYtd, SamePeriodLastYear and ParallelPeriod. This blog shows how to use DAX date functions to summarise data, assuming that you have already created a calendar table.
- Creating date-based functions in DAX in SSAS Tabular (this blog)
- Cumulative totals (TotalYTD, DatesYTD, etc)
- The same period in a previous month, quarter or year
- Using PARALLELPERIOD to get the whole of the last period
- Moving averages using DAX date functions
- Semi-additive measures in DAX
This blog is part of our online SSAS Tabular tutorial; we also offer lots of other Analysis Services training resources.
Posted by Andy Brown on 08 February 2016
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Creating date-based functions in DAX in SSAS Tabular
This blog introduces some of the main useful date functions in DAX:

The main date functions which you can use in SSAS Tabular.
The functions that we'll meet are:
Blog | Functions |
---|---|
Cumulative totals |
TotalYTD, TotalQTD, TotalMTD DatesYTD, DatesQTD, DatesMTD |
Comparison with previous periods | SamePeriodLastYear, DateAdd |
Parallel periods | ParallelPeriod |
Moving averages | DatesBetween, NextDay, LastDate |
Semi-additive measures | FirstDate, LastDate, FirstNonBlank, LastNonBlank |
We'll begin with one of the simplest things you can do with date functions: show cumulative totals to date.
- Creating date-based functions in DAX in SSAS Tabular (this blog)
- Cumulative totals (TotalYTD, DatesYTD, etc)
- The same period in a previous month, quarter or year
- Using PARALLELPERIOD to get the whole of the last period
- Moving averages using DAX date functions
- Semi-additive measures in DAX