Respect the row’s filter with KEEPFILTERS
Make a Bikes filter work with the matrix instead of replacing it, so the Accessories row shows nothing instead of bike sales.
You will learn to
- Predict when a CALCULATE filter replaces the visual’s filter
- Intersect filters with KEEPFILTERS
How it works
A CALCULATE filter on a column **replaces** any filter already on that same column. That’s why `[Bike Sales]` shows bike sales in every row of a matrix by Category, even the Clothing row.
Wrap the filter in `KEEPFILTERS( )` and CALCULATE keeps the existing filter as well, so both must be true. In the Bikes row that’s still bikes; in the Clothing row, “Clothing and Bikes” leaves nothing, so the cell is blank.
Use KEEPFILTERS when your filter should narrow down what the visual shows, not override it.
Practice it hands-on with a real data model and a live report that updates as you type.
Visible Red Sales = CALCULATE([Total Sales], KEEPFILTERS(Product[Color] = "Red"))