PL-300 SAMEPERIODLASTYEAR Practice Question
Exhibit
Refer to the exhibit.
```dax
Sales YoY % =
VAR CurrentSales = SUM(Sales[Amount])
VAR PreviousSales = CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
DIVIDE(CurrentSales - PreviousSales, PreviousSales)
```You have the DAX measure shown. The measure returns blank for some periods even though there are sales in the current period. What is the most likely cause?
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
✓
The Date table does not contain all dates from the previous year.
The correct option is A: the Date table does not contain all dates from the previous year. A typical year-over-year DAX measure uses SAMEPERIODLASTYEAR or DATEADD over the marked Date table, and if the Date table is missing dates from the prior year, the time-intelligence function returns an empty set, so the measure evaluates to blank even though current-period sales exist. Time intelligence in DAX requires a contiguous, complete Date table marked as a date table; gaps in prior-year dates break the shifted filter context. Option B is too generic and does not explain blanks tied specifically to prior-year periods. Option C is unlikely because a variable referencing current sales would still evaluate in the current context. Option D is incorrect because DIVIDE returns blank only when the denominator is zero or blank, which would not selectively blank prior-year comparisons when current sales exist.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The Date table does not contain all dates from the previous year.
Why this is correct
SAMEPERIODLASTYEAR shifts the current filter dates back one year along the contiguous date column of the Date table. If that table is non-contiguous or does not include every day of the previous year, the function returns an empty set, making PreviousSales BLANK. Consequently, DIVIDE, with a blank denominator, yields BLANK despite a valid CurrentSales. This is the exact root cause.
- ✗
The measure is not properly filtered by the current context.
Why it's wrong here
The measure is actually evaluated within the current filter context; CurrentSales is computed per row of the visual or per selection. The problem is not missing filters but the inability of SAMEPERIODLASTYEAR to generate a prior-year date range because those dates are absent from the Date table. Therefore, this explanation incorrectly assigns the fault to filter propagation rather than to the date table's incompleteness.
- ✗
The variable CurrentSales is not evaluated correctly.
Why it's wrong here
The variable CurrentSales is correctly defined using VAR and evaluates [Sales Amount] in the current filter context. The issue lies downstream: even though CurrentSales has a value, the measure returns blank because PreviousSales is blank. Thus, the numerator is not the culprit, and this option misidentifies the root cause.
- ✗
The DIVIDE function returns blank when denominator is zero.
Why it's wrong here
DIVIDE does return BLANK when the denominator is zero, but here the denominator is not zero; it is BLANK. The blank is caused by SAMEPERIODLASTYEAR failing to return dates because the Date table lacks all previous-year dates. So while DIVIDE's behavior is relevant, the trigger is missing dates, not a mathematical zero.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PL-300 question from scratch — 524 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.