
In a recent YouTube video, SQLBI explains how to use DAX user-defined functions to clear column filters by returning REMOVEFILTERS from a function. The video highlights the feature that arrived with the Power BI Desktop update in September 2025 and shows practical examples so viewers can follow along. Moreover, it frames the capability as a shift in how report authors can encapsulate filter logic for reuse across models.
According to the presentation, the key shift is that functions can now be defined and saved in the model using the DEFINE FUNCTION syntax, and then called like built-in functions. This makes it possible to centralize logic that previously had to be copied into many measures. As a result, model maintenance and consistency improve when teams standardize commonly used calculations.
SQLBI demonstrates that embedding REMOVEFILTERS inside a user-defined function allows the function to explicitly ignore external slicers or column filters. In practice, this means you can write a function that always computes totals across the entire calendar or product table regardless of what a report page selects. Consequently, you get predictable results from a single function call instead of relying on callers to manage context.
The video also explains parameter evaluation modes for functions: parameters can be declared as val for eager evaluation or expr for lazy evaluation. This distinction matters because it controls when expressions are evaluated and how they interact with filter context and REMOVEFILTERS. Thus, authors must choose the right parameter type to avoid unexpected behavior.
SQLBI shows several examples where UDFs simplify common analytics tasks, such as computing running totals, Top N logic, or aggregate measures that ignore slicers. By packaging these patterns into a function, teams can reduce repetition and enforce consistent business rules throughout a model. Furthermore, sharing functions across reports helps maintain a single source of truth for complex calculations.
Another practical advantage is the ability to implement functions that DAX did not natively provide, such as custom math routines, while avoiding repetitive context handling. Consequently, users can create more expressive models and hide implementation details inside named functions. This leads to cleaner measure definitions and simpler report-level formulas.
However, SQLBI cautions that using REMOVEFILTERS inside UDFs carries tradeoffs. For instance, removing filters can break expected interactions in visuals where users expect slicers to apply. Therefore, designers must balance the desire for consistent calculations with the need for interactive, filter-aware reports. In other words, a function that globally clears filters may be useful for a specific KPI but harmful if applied where local context matters.
Performance is another concern: clearing filters on very large tables can increase query scope and processing time, especially when the resulting calculation forces scans rather than leveraging existing indexes. Moreover, wrapping complex logic into a function can obscure optimization paths and make it harder to profile slow queries. Thus, testing performance impacts across realistic datasets is critical before broad adoption.
SQLBI highlights debugging and maintainability as practical challenges when adopting UDFs that use REMOVEFILTERS. Because functions can hide internal logic, report authors must document parameter expectations and evaluation mode choices carefully. Otherwise, other team members might misuse a function or pass expressions that lead to subtle context errors.
To manage these risks, the video recommends a few best practices: keep functions small and focused, name them clearly to reflect how they treat filters, and include comments or model-level documentation. Additionally, validate functions in diverse report scenarios and measure performance implications. By doing so, teams can enjoy reuse benefits while keeping transparency and speed under control.
For those who want to try the feature, SQLBI walks viewers through enabling the preview option in Power BI Desktop and creating functions either in the DAX query view or using tools like Tabular Editor. The video then shows how to save the function to the model and call it from measures and calculated columns, providing a clear on-ramp for practitioners. Consequently, authors can quickly move from concept to working examples.
Finally, the presenter urges a measured rollout: start by modeling a few widely used calculations as functions, test them with real reports, and gather feedback from report consumers. As teams iterate, they can expand the function library and refine naming and documentation. In short, SQLBI’s YouTube video offers a practical, balanced guide to a powerful new tool that improves reusability but requires deliberate design and testing.
REMOVEFILTERS DAX, DAX user defined functions, Power BI REMOVEFILTERS examples, REMOVEFILTERS syntax, DAX filter context REMOVEFILTERS, REMOVEFILTERS performance tips, custom DAX functions REMOVEFILTERS, REMOVEFILTERS vs ALL DAX