Courseiva

PL-300 Visualize and analyze the data Practice Question

Exhibit

Refer to the exhibit.

```dax
Sales YoY % = 
VAR CurrentSales = SUM(Sales[Amount])
VAR PreviousSales = CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR(Calendar[Date]))
RETURN
DIVIDE(CurrentSales - PreviousSales, PreviousSales, 0)
```

Refer to the exhibit. You have a DAX measure that calculates year-over-year sales growth. When you add this measure to a table visual with Year and Month, some rows show blank values. 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 Calendar table does not have a continuous date range, causing SAMEPERIODLASTYEAR to return blank for some months

The correct answer is D: the Calendar table does not have a continuous date range, causing SAMEPERIODLASTYEAR to return blank for some months. Time-intelligence functions like SAMEPERIODLASTYEAR require a contiguous, gap-free date column in a marked Date table; if any dates are missing, the shifted period lookup fails and the measure returns BLANK for the affected rows. Option A is wrong because SAMEPERIODLASTYEAR works at any granularity, including month, as long as the date table is continuous. Option B is wrong because a divide-by-zero would typically surface as an error or infinity, not blank, and DAX's DIVIDE handles it gracefully. Option C is wrong because an inactive Sales–Calendar relationship would break the measure for all rows, not just some months.

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 measure cannot be used at the month level because SAMEPERIODLASTYEAR only works at year level

    Why it's wrong here

    SAMEPERIODLASTYEAR is a time-intelligence function that operates on any continuous date interval, regardless of granularity. It shifts the current filter context back one year while preserving the original grain — a month-level filter such as June 2024 resolves to June 2023, and a day-level filter resolves to the same day one year prior. The function is not limited to year-level calculations; it works equally well at day, week, quarter, and month levels as long as the date table is contiguous.

  • ✗

    The measure is trying to divide by zero for months with no sales in the previous year

    Why it's wrong here

    For months with no prior-year sales, the denominator in the measure would be BLANK or 0, but DIVIDE is specifically designed to handle this case safely. When you use DIVIDE(numerator, denominator, 0), the function returns 0 as the result whenever the denominator is 0 or BLANK, preventing any error. Even if the originating formula uses DIVIDE without an explicit third argument, DAX's DIVIDE defaults to returning BLANK for divide-by-zero scenarios — never an error. Thus, a zero or blank denominator cannot cause the blank values described in the problem.

  • ✗

    The relationship between Sales and Calendar is inactive

    Why it's wrong here

    If the relationship between Sales and Calendar were truly inactive, the CALCULATE in the measure would not propagate the date filter from the Calendar table to Sales, and the entire calculation would return incorrect results for all rows — not just some months. In the exhibit, the relationship is active, so CALCULATE automatically uses it to apply the filter context from SAMEPERIODLASTYEAR. An inactive relationship would require the explicit USERELATIONSHIP modifier inside CALCULATE, but the measure likely doesn't have that, and adding it would still not fix a missing-date problem.

  • ✓

    The Calendar table does not have a continuous date range, causing SAMEPERIODLASTYEAR to return blank for some months

    Why this is correct

    The root cause is that SAMEPERIODLASTYEAR requires a contiguous sequence of dates in the Calendar table to determine the prior-year period. If the Calendar table has gaps — for example, missing weekends, holidays, or incomplete year boundaries — the function cannot compute a continuous shift and returns BLANK for those months. Time-intelligence functions in DAX depend on a complete, continuous date dimension; any missing date breaks the comparison. Marking the table as a date table does not compensate for missing rows; the table must actually contain every date in the range.

About these practice questions

This PL-300 question is part of Courseiva's 524-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.