Working with time intelligence and DAX
The time intelligence functionality is an important part of any analytics solution. Tabular models are no exception. DAX has several functions that support time intelligence. In order for these functions to work, a table in the model must be marked as Date Table. In Chapter 7, Building a Tabular Model in SSAS 2019, we marked our date table as the date table for this purpose. The requirements for the date table are called out in that chapter as well.
Time intelligence functions in DAX allow you to perform calculations with your data over supported time periods. This includes year, quarter, month, and day. Some of the functions are common, including the to date
functions such as YTD
, QTD
, and MTD
. Others have specific use cases, such as the BALANCE
functions, which can be used to calculate a value at the end of a period such as a month, CLOSINGBALANCEMONTH
.
We are going to create a few calculations using the Invoice Sales
table. We will be...