Courseiva

PL-300 Visualize and analyze the data Practice Question

Exhibit

Refer to the exhibit.
```dax
Total Sales = 
VAR SelectedDate = MAX('Date'[Date])
VAR SalesToDate = 
CALCULATE(
    SUM('Sales'[Amount]),
    'Date'[Date] <= SelectedDate,
    ALL('Date')
)
RETURN
SalesToDate
```

You have a measure as shown in the exhibit. The sales amount is not accumulating correctly; instead, it shows the total sales for all dates, regardless of the selected date filter. What is the problem?

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 ALL('Date') function removes the filter context, so the calculation returns total sales for all dates.

Using ALL('Date') within CALCULATE removes the filter context on the Date table, causing the measure to return the total sales across all dates, not the current date context. Option A is incorrect; ALLEXCEPT would keep certain filters, but the problem here is specifically the removal of all date filters by ALL. Option C is incorrect; using MIN versus MAX in VAR SelectedDate does not cause the described behavior; the issue is the ALL function. Option D is incorrect; an inactive relationship would prevent proper filtering but would not result in the measure returning the total for all dates; the symptom would be different.

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 should use ALLEXCEPT instead of ALL.

    Why it's wrong here

    ALLEXCEPT removes filters except on listed columns, so it would still clear the Date filter and return total sales. It is tempting because ALLEXCEPT is correct when you must preserve filters on specific columns such as Product while clearing others, which is not this requirement.

  • ✓

    The ALL('Date') function removes the filter context, so the calculation returns total sales for all dates.

    Why this is correct

    ALL('Date') strips the date filter context from the Date table, so the measure aggregates every row regardless of slicer or axis selection. Removing that filter is precisely what makes the result show total sales for all dates instead of accumulating.

  • ✗

    The VAR SelectedDate should be MIN instead of MAX.

    Why it's wrong here

    MIN vs MAX does not change the issue; both return a single date.

  • ✗

    The relationship between Sales and Date is inactive.

    Why it's wrong here

    An inactive relationship is not automatically applied in filter context, so it would not by itself return total sales across all dates. It is tempting because activating a relationship with USERELATIONSHIP is correct when a role-playing dimension requires an alternative join path.

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 →

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.