We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Time Intelligence Functions

Time functions in DAX help you analyze how values change over time by using your Date table to understand the order of days, months, and years. Two of my favorites are:

Total Month-to-Date

The TOTALMTD function calculates the total of a measure from the start of the current month up to the current date. Here's an example that calculates the number of new customers acquired in the current month up to today.

MTD New Customers =
  TOTALMTD(
    [New Customers],
    dates[date_date]
  )

Previous Month

The PREVIOUSMONTH function shifts the date context back one full month and calculates the measure for that previous month. Here's an example that calculates the number of new customers acquired in the previous month:

Previous Month New Customers =
  CALCULATE(
    [New Customers],
    PREVIOUSMONTH(dates[date_date])
  )

I've used these functions for years, and you'll see them used in a lot of dashboards! Now, because our data for this course is a snapshot from the past, we won't use these now, but when you have "live" data they're very useful.