pl-300 Practice Question 1932
Exam: pl-300
Domain: Model the data
Topic: Create model calculations by using DAX
Difficulty: medium
You are working on a financial dashboard and need to calculate the sales amount for the current month while excluding any rows where the product category is 'Electronics'. Which DAX function should you use to filter out the rows before calculating the sales amount?
Answer Options
A
CALCULATE
B
FILTER
C
CALCULATETABLE
D
ROWCONTEXT
Correct Answer
B: FILTER
Explanation
The correct answer is `FILTER` because it allows you to specify conditions to filter the rows before performing the calculation. `CALCULATE` can also be used but it changes the context of the entire expression, whereas `CALCULATETABLE` returns a table rather than a scalar value, and `ROWCONTEXT` is not a valid DAX function.