Replacing FILTER with KEEPFILTERS in Power BI
You have a Microsoft Power BI semantic model that contains measures. The measures use multiple CALCULATE functions and a FILTER function. You are evaluating the performance of the measures. In which use case will replacing the FILTER function with the KEEPFILTERS function reduce execution time?
Community Votes
80% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
DAX performance optimization favors Boolean expressions over FILTER for Import storage mode, making KEEPFILTERS the efficient choice for single-table filters.
Replacing the FILTER function with KEEPFILTERS in DAX measures improves performance when filtering a single column in an Import mode table. This page explains the optimization benefits of using Boolean expressions over table expressions for DAX evaluation.
Choosing C (multiple tables) because KEEPFILTERS is thought to handle cross-table filtering better, but Boolean expressions in KEEPFILTERS cannot reference columns from multiple tables.
Community Discussion (19 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
ReplacingFILTER with KEEPFILTERS allows the filter argument to be passed as a Boolean expression rather than a table expression. For Import mode tables, which are in-memory column stores, the DAX engine is explicitly optimized to efficiently filter columns using Boolean expressions. When the filter references a single table, this substitution significantly reduces execution time compared to the row-by-row iteration required by FILTER.Why the Other Options Are Wrong
Option A is incorrect because nestedCALCULATE functions create context transitions that are unrelated to the core performance difference between FILTER and KEEPFILTERS. Option B is incorrect because while referencing a measure inside FILTER is inefficient, KEEPFILTERS does not inherently resolve measure evaluation overhead. Option C is incorrect because Boolean expressions used with KEEPFILTERS have restrictions and cannot reference columns from multiple tables; thus, FILTER remains necessary in those cross-table scenarios.Community Comment Notes
Commenters correctly identified that Import model tables are optimized for Boolean expressions, as IAMcertified noted by referencing the docs: "This article is especially relevant for model calculations that apply filters to Import tables". Another commenter, lpuech, pointed out that options A, B, and C represent limitations where Boolean expressions cannot be used effectively, further validating option D.Official Reference
Exam Strategy
When evaluating DAX performance, remember that FILTER generates a table expression and iterates row-by-row, whereas KEEPFILTERS leverages optimized Boolean expressions. Look for Import mode and single-table references as the primary indicators where KEEPFILTERS improves speed.
Related Analysis
Practice All DP-600 Questions
Access 115 questions with complete answers and detailed explanations.
View Full DP-600 Practice Test →