Introducing the filter context and CALCULATE
- By Alberto Ferrari and Marco Russo
- 2/25/2026
Conclusions
In this chapter, we briefly introduced the concept of the filter context and CALCULATE.
Each cell in a matrix has its unique filter context, the filter context your measure starts with. We sometimes call the cell filter context the original filter context, the first context in which the measure is being evaluated. Whenever a measure should direct the calculation to another area of the model, developers can rely on CALCULATE to change the filter context.
CALCULATE can add or remove filters. When CALCULATE creates a filter, it overrides any existing filter in the same column. Developers can change this behavior by using KEEPFILTERS or IN VALUES. REMOVEFILTERS removes filters from the filter context and can remove filters from columns, tables, or the entire data model.
There are still a lot of details that we need to cover before we can master the filter context and CALCULATE. Before diving into more complex details in the next chapter, we manipulate the filter context by creating some calculations, leaving the more intricate technical details for later in the book.
