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 combination is most appropriate?
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
✓
CALCULATE with SAMEPERIODLASTYEAR and DIVIDE
SAMEPERIODLASTYEAR returns the equivalent date range shifted back exactly one year, and wrapping it in CALCULATE lets you evaluate the prior-year sales in the current row context; DIVIDE then safely computes the growth ratio (Current − PriorYear) / PriorYear without divide-by-zero errors. This is the standard DAX pattern for year-over-year percentage growth in Power BI and Analysis Services Tabular models. Option A is less appropriate because DATEADD requires an explicit number and interval and is more error-prone for a simple YoY shift, while SAMEPERIODLASTYEAR is purpose-built for this. Option C's TOTALYTD computes a year-to-date aggregate, not a prior-year comparison, so it cannot produce YoY growth. Option D's PREVIOUSMONTH shifts by one month, not one year, so it answers a month-over-month question instead.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
CALCULATE with DATEADD and SUM
Why it's wrong here
DATEADD can shift dates by a specified interval, but without an explicit interval like YEAR it would only shift by the default (often one day) or require parameters that are easy to misconfigure, potentially returning an incorrect prior-year period. SUM alone provides no division, so the measure would return a total rather than a growth percentage. While CALCULATE with DATEADD could theoretically be used with a YEAR interval, this option lacks the predefined SAMEPERIODLASTYEAR reference and the safe division needed to deliver the required year-over-year value.
- ✓
CALCULATE with SAMEPERIODLASTYEAR and DIVIDE
Why this is correct
CALCULATE modifies the filter context so SAMEPERIODLASTYEAR can shift the current date range back one full year, returning the exact corresponding period from the prior year. DIVIDE then computes the percentage change as (Current - Previous) / Previous, and its third argument handles division by zero by default, preventing errors. This combination is the standard DAX pattern for year-over-year growth and is fully aligned with the requirement.
- ✗
TOTALYTD and DIVIDE
Why it's wrong here
TOTALYTD is a time-intelligence function that aggregates values from the start of the year to the latest date in the current filter context, designed for year-to-date running totals rather than full-period comparisons. When combined with DIVIDE, it can calculate a year-to-date percentage change, but it does not compare the entire selected period to the same period in the prior year. The question asks for year-over-year growth for a complete period, so TOTALYTD would incorrectly restrict the calculation to a partial-year window.
- ✗
PREVIOUSMONTH and SUM
Why it's wrong here
PREVIOUSMONTH is a time-intelligence function that shifts the filter context back exactly one calendar month, making it suitable for month-over-month comparisons but incapable of reaching back a full year. SUM only aggregates the selected values; it does not compute a ratio or percentage. Together they would produce a single-period total and its prior month total, leaving no mechanism to calculate the year-over-year growth percentage the question requires.
About these practice questions
One of 524 original PL-300 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.