PL-300 Prepare the data Practice Question
Exhibit
Refer to the exhibit.
```dax
CALCULATE(
SUM(Sales[Amount]),
FILTER(
Sales,
Sales[Date] >= DATE(2024,1,1) && Sales[Date] <= DATE(2024,12,31)
)
)
```Refer to the exhibit. You are reviewing a DAX measure in Power BI. The measure is intended to calculate total sales for the year 2024. However, when used in a visual with a slicer on 'Sales[Date]', the measure does not respect the slicer selection. What is the most likely reason?
⚠ Common exam trap
Test-takers frequently assume CALCULATE always respects slicers, but they miss that explicit filter arguments (like FILTER) override external filters on the same columns, leading to the slicer being ignored.
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 FILTER function overrides the slicer filter context.
The FILTER function in the measure creates a new filter context that overrides the existing slicer filter context on 'Sales[Date]'. When CALCULATE evaluates the expression, it applies the FILTER as a table modifier, which replaces any external filters on the Date column, causing the slicer to be ignored. This is a common DAX behavior where explicit filter arguments in CALCULATE take precedence over existing filter contexts.
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 FILTER function overrides the slicer filter context.
Why this is correct
In DAX, CALCULATE modifies the filter context by applying its filter arguments. When FILTER is used as a filter argument, it creates a new filter on the Sales table that replaces any existing filters on that table, including those from a slicer. This replacement behavior is by design: filter arguments in CALCULATE override existing filters on the same columns or tables. Therefore, the slicer's context is ignored, and the measure returns values based solely on the FILTER condition.
- ✗
The CALCULATE function removes all filters by default.
Why it's wrong here
CALCULATE does not remove all filters by default; it only modifies the filter context based on its filter arguments. Unconditional removal occurs only when you explicitly specify functions like REMOVEFILTERS or ALL within CALCULATE. Without those, all other filters from the slicer remain active unless the filter argument directly targets the same table or column. Thus, the statement misunderstands CALCULATE's default behavior, leading to an incorrect diagnosis of the measure's issue.
- ✗
The measure should use ALL(Sales[Date]) to respect slicers.
Why it's wrong here
Using ALL(Sales[Date]) would remove filters from the Date column entirely, suppressing the slicer's filter context rather than respecting it. The ALL function is designed to clear filters, so it would make the measure ignore slicer selections even more aggressively. To respect slicers, you should omit any filter argument on that column or use FILTER with KEEPFILTERS to intersect rather than replace the existing filter. This option is the opposite of the correct approach.
- ✗
The DATE function syntax is incorrect.
Why it's wrong here
The DATE function in DAX takes year, month, and day as numeric arguments, and the syntax in the measure follows this pattern correctly. For example, DATE(2023, 1, 1) is valid and returns a date. Therefore, the DATE function is not the source of the problem. The issue stems from how CALCULATE and FILTER manipulate the filter context, not from any error in the DATE function's syntax.
Go deeper
Related to this question
About these practice questions
This PL-300 question is part of Courseiva's 217-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 →
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.