Recall & Review
beginner
What does the DAX function SAMEPERIODLASTYEAR do?
It returns a table of dates shifted one year back from the dates in the current context. This helps compare data from the same period last year.
Click to reveal answer
beginner
Write a simple DAX measure using SAMEPERIODLASTYEAR to calculate last year's sales.
Last Year Sales = CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR(Calendar[Date]))
Click to reveal answer
intermediate
Why do you need a continuous date column when using SAMEPERIODLASTYEAR?
Because SAMEPERIODLASTYEAR works on a continuous date column to correctly shift dates by one year. Missing dates can cause wrong or empty results.
Click to reveal answer
beginner
Can SAMEPERIODLASTYEAR be used with non-date columns?
No. SAMEPERIODLASTYEAR only works with date columns because it shifts dates by one year to find the matching period.
Click to reveal answer
intermediate
What is the difference between SAMEPERIODLASTYEAR and PARALLELPERIOD?
SAMEPERIODLASTYEAR shifts the dates exactly one year back keeping the same period length, while PARALLELPERIOD can shift by months, quarters, or years and allows more flexible offsets.
Click to reveal answer
What does SAMEPERIODLASTYEAR return?
✗ Incorrect
SAMEPERIODLASTYEAR returns a table of dates shifted exactly one year back from the current context.
Which column type is required for SAMEPERIODLASTYEAR to work correctly?
✗ Incorrect
SAMEPERIODLASTYEAR needs a continuous date column to shift dates by one year properly.
Which DAX function can be combined with SAMEPERIODLASTYEAR to calculate last year's sales?
✗ Incorrect
CALCULATE changes the filter context and is used with SAMEPERIODLASTYEAR to calculate last year's sales.
Can SAMEPERIODLASTYEAR shift dates by months or quarters?
✗ Incorrect
SAMEPERIODLASTYEAR only shifts dates exactly one year back, not by months or quarters.
What happens if the date column has missing dates when using SAMEPERIODLASTYEAR?
✗ Incorrect
Missing dates can cause SAMEPERIODLASTYEAR to return wrong or empty results because it expects continuous dates.
Explain how SAMEPERIODLASTYEAR helps in comparing sales data year over year.
Think about how you compare this year's sales to last year's same time.
You got /4 concepts.
Describe the correct way to write a DAX measure using SAMEPERIODLASTYEAR to calculate last year's total sales.
Combine CALCULATE and SAMEPERIODLASTYEAR with SUM.
You got /4 concepts.