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:
- 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
Sales Amount YTD:=TOTALYTD(SUM(InternetSales[SalesAmount]),'Date'[FullDateAlternateKey])
- Save the changes and analyze the model in Excel. Select ...