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

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…

Contents