WiseOwl Training - Established 1992 Wise Owl Training

Established May 1992
30 years in business
Wise Owl Training
30 years in business
See 519 reviews for our classroom and online training
How to use DAX date-based functions in Analysis Services tabular model
Part one of a six-part series of blogs

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.

  1. Creating date-based functions in DAX in SSAS Tabular (this blog)
  2. Cumulative totals (TotalYTD, DatesYTD, etc)
  3. The same period in a previous month, quarter or year
  4. Using PARALLELPERIOD to get the whole of the last period
  5. Moving averages using DAX date functions
  6. 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:

DAX date functions

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. 

This blog has 0 threads Add post