From the course: SQL Server Analysis Services
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Examining three popular DAX time intelligence functions: SAMEPERIODLASTYEAR, PARALLELPERIOD, and TOTALYTD - SQL Server Tutorial
From the course: SQL Server Analysis Services
Examining three popular DAX time intelligence functions: SAMEPERIODLASTYEAR, PARALLELPERIOD, and TOTALYTD
- [Instructor] Let's take a look at writing several different time intelligence measures. The first one we're going to write is going to use same period next year. This function shows the value for whatever period you're looking at, quarter, month, year. For values in the previous year, we're going to create this measure using a measure we created already total sales. The new measure is going to filter total sales using same period last year in a calculate statement. So let's go ahead and create that. This measure, it will be called prior sales. Add the colon and the equal sign. Then we'll type the letter C so that we can get intelligent sense to work and see our calculate statement. So we're going to add our expression and that's going to be total sales. Select the square bracket. I can get a list of all of my measures, going to select total sales. And then the comma is where I'm going to start my filtering. And I'm…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Incorporating time intelligence2m 56s
-
(Locked)
All about the date table4m 38s
-
(Locked)
Examining three popular DAX time intelligence functions: SAMEPERIODLASTYEAR, PARALLELPERIOD, and TOTALYTD9m 22s
-
(Locked)
Writing DATESBETWEEN measures7m 14s
-
(Locked)
Challenge: Time intelligence measures3m 18s
-
(Locked)
Solution: Time intelligence measures2m 32s
-
(Locked)
-
-
-
-