How to Manage Time Intelligence Functions in Data Analysis Expressions?
DAX or Data Analysis Expressions encompasses time-intelligence functions. These functions enable in manipulating data by using periods that include the following:
Days
Months
Quarters, and Years
Upon then, time building and times comparison calculations over the periods. In general, time Intelligence is a common term used in the DAX or Data Analysis Expressions in the case of building data models. It’s the organized and combined data into time periods.
Also, it helps understand how every period connects to other groupings in sequential order. This post brings the best ways of exploring various Time Intelligence functions with in-depth experience. Let’s learn the basics through the given narration. Here’s outlining the quintessential model requirements:
Essential Model Requirements
To begin with the Time Intelligence functions, one needs a data table in the data model. In addition, the data table must meet these demands:
One date column having the data type of time or date
Outstanding values for the date column
No missing blanks or values
Data columns should cover the full years
Quintessential Time Intelligence Functions
These functions can get categorized into two main segments:
While one is the summarization over time
The other is the comparison over time
Exploring the month-to-date, quarter-to-date, and year to date
Two approaches are there to create the measures for the summarization. The first is to create a calculated measure of the Total Sales (you will need to create the next measure based on it)
Using CALCULATE function: Three functions are there, namely DATESQTD, DATESYTD, and DATESMTD
Without CALCULATE function: Use the simplified DAX functions to up-to-date calculations TOTALQTD, TOTALMTD, and TOTALYTD
Computing the time periods from previous periods
The functions are useful to make comparisons of the trends during the period of the current year to that same period of the last year.
Using the DATEADD Function
The DATEADD function happens to be generic, using the type and number of periods to shift.
Using the PARALLELPERIOD Function
It’s quite similar to DATEADD, as it returns its full period in a third parameter rather than the partial period such as DATEADD.
Calculating The Moving Total On An Annual Basis
After finding differences over the prior periods, it’s time to explore the difference over the previous year (i.e., YOY). It’s one more calculation that eliminates the seasonal changes in sales: MAT or moving annual total. Usually, it’s the aggregation over the previous 12 months.
Dividing this value by the number of months in a period will average it over a particular time frame. All in all, it gives an MAA or moving annual average.
The reason behind this is because the time intelligence functions available for custom calendars allow users to quite easily and effectively write a formula and achieve the results that they want.
So, now that you have captured the important periods in the time intelligence functions, it’s time to learn more from professionals. There are so many ways with which you can implement the technique. It’s critical to try & learn them. The truth is combining DAX formulas will help you accomplish a lot of things. On this note, you can consult Enterprise DNA to learn further about times comparison.