PL-300 Visualize and analyze the data Practice Question
You need to create a measure that calculates the year-over-year growth percentage for sales. Which DAX function should you use?
⚠ Common exam trap
Many candidates confuse SAMEPERIODLASTYEAR with PREVIOUSYEAR, mistakenly thinking PREVIOUSYEAR can be used for any period comparison, but PREVIOUSYEAR only works for full calendar year comparisons, not for partial periods like months or quarters.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
SAMEPERIODLASTYEAR
The SAMEPERIODLASTYEAR function is the correct choice for calculating year-over-year growth because it shifts the current filter context back by one year, returning a set of dates exactly one year prior. This allows you to compute the prior year's sales and then derive the growth percentage using a formula like (Current Sales - Prior Year Sales) / Prior Year Sales.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
DATEADD
Why it's wrong here
DATEADD shifts a date column by a specified number of intervals, returning a table of dates, not a scalar growth percentage. It fails here because year-over-year growth requires comparing a measure across two time periods (e.g., using SAMEPERIODLASTYEAR or CALCULATE with DATEADD inside a filter), not merely offsetting dates. It is tempting because DATEADD is commonly used in time-intelligence calculations, and would be correct if the goal were to shift a date range for a filter argument rather than directly calculating a percentage.
- ✗
PARALLELPERIOD
Why it's wrong here
PARALLELPERIOD shifts a set of dates by a specified number of intervals, such as years, but it does not preserve the exact same period granularity needed for a year-over-year comparison. For example, if the current filter context is March 2023, PARALLELPERIOD with -1 YEAR returns the entire year 2022, not just March 2022, because it operates on the whole date range. This misalignment makes it unsuitable for calculating a growth percentage that compares one month or quarter to its counterpart in the prior year, as the resulting value would be aggregated over an entirely different period.
- ✓
SAMEPERIODLASTYEAR
Why this is correct
SAMEPERIODLASTYEAR is a time-intelligence function that returns a table of dates shifted exactly one year back from the current filter context, preserving the same day, month, and quarter boundaries. When used inside CALCULATE, it recalculates a measure over that prior-year date range, making it the precise foundation for a year-over-year growth calculation. Because it respects the current filter context and automatically handles leap years by shifting to the nearest valid date, it is the standard choice for comparing any arbitrary period—month, quarter, or cumulative range—to the same period in the previous year.
- ✗
PREVIOUSYEAR
Why it's wrong here
PREVIOUSYEAR returns a set of dates covering the entire calendar year that precedes the most recent year in the current filter context, rather than the same relative period. For instance, if the current filter is March 2023, PREVIOUSYEAR yields all of 2022, which means comparing the current measure to it would use the full-year total, not the March 2022 figure, thereby skewing the growth percentage. This function is designed for full-year comparisons or year-to-date versus full previous year scenarios, not for like-for-like period-over-period growth, making it incorrect for a standard YoY measure that aligns with the current month or quarter.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PL-300 question from scratch — 217 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PL-300 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-300 exam.