Tutorial with example
In today’s video we will go through the DAX function called SAMEPERIODLASTYEAR. This little function is great for analyzing as the function itself says, the same period last year.
If you have seasonal business and you want to analyze what happened the same period the previous year, it will do it flawlessly.
Depending on how you use it, it could give you incorrect results. Stay tuned the entire video to understand how to avoid it.
Download example file:
To get the files:
1. Go to Curbal Download Center > Dax Fridays
2. Get File #75
The dates argument can be any of the following:
- A reference to a date/time column,
- A table expression that returns a single column of date/time values,
- A Boolean expression that defines a single-column table of date/time values.
The dates returned are the same as the dates returned by this equivalent formula:
DATEADD(dates, -1, year)
This DAX function is not supported for use in DirectQuery mode.