Time for action – using time intelligence functions in DAX

In this example, we will create some measures such as year-to-date, quarter-to-date, fiscal year-to-date, and running total, in order to show you how to use DAX functions and create expressions as you wish. As part of this example, we will use the CALCULATE function, which calculates an expression on a filter context. So, perform the following steps that show the use of time intelligence functions:

  1. Go to Grid View of the InternetSales table and add a new measure using the following expression, and change the format string of this measure to Currency:
    Sales Amount YTD:=TOTALYTD(SUM(InternetSales[SalesAmount]),'Date'[FullDateAlternateKey])
  2. Save the changes and analyze the model in Excel. Select ...

Get Microsoft SQL Server 2014 Business Intelligence Development: Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.