
Answer-first summary for fast verification
Answer: when the FILTER function uses a nested calculate function
Replacing the FILTER function with the KEEPFILTERS function will reduce execution time when the FILTER function uses a nested calculate function. The FILTER function in DAX filters a table to the rows that meet the condition provided in its arguments. When FILTER is used within a CALCULATE function, it typically modifies the context in which the calculation is performed, creating a context transition. Using KEEPFILTERS in this scenario can improve performance by modifying the behavior of context transition to ensure that existing filters on a table are not unintentionally removed or overridden, which can otherwise increase the complexity and computational load of the query.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are working with a Microsoft Power BI semantic model that incorporates several measures. These measures utilize multiple instances of the CALCULATE function in conjunction with the FILTER function. As part of optimizing your Power BI model, you are assessing the performance of these measures. In what scenario will substituting the FILTER function with the KEEPFILTERS function lead to a reduction in execution time?
A
when the FILTER function uses a nested calculate function
B
when the FILTER function references a measure
C
when the FILTER function references columns from multiple tables
D
when the FILTER function references a column from a single table that uses Import mode
No comments yet.