Forum Discussion
Odd error on Matrix with Visual Calculation
Hi wcarter ,
This isn't a bug — it's a hard limitation of Visual Calculations. They live only inside the rendering context of the visual, not in the model. Because of that, the engine can't resolve filter context when you try to filter on any Values field in a matrix that contains a Visual Calculation.
The official docs are pretty clear on this: filtering, sorting, and changing aggregations are all listed as unsupported features for visual calculations . It's not just that you can't filter by the Visual Calculation — the presence of one in the visual breaks filtering on other Values fields too.
What I'd suggest:
- Rewrite the calculation as a regular measure, if possible. Measures participate in filter context properly and won't block your Values filters. The only reason to use a Visual Calculation is if you need functions like LOOKUPWITHTOTALS, EXPAND, or ISATLEVEL that only exist in that context.
- Filter through Rows or Columns instead, since you've already confirmed that works. If the filter is on a field that can be placed on an axis, that's your path.
- Apply the filter outside the visual — via a slicer or page-level filter — rather than through the visual's own Filters pane.
If the calculation absolutely must stay as a Visual Calculation and you need Values filtering, you're stuck unless Microsoft changes the behavior. There's no workaround that preserves both.
- wcarter3 days ago
Advocate III
The AI Slop you copy and pasted is wrong, the documentation doesn't say anything about values in a matrix filtering with Visual Calculations present.
Most importantly, a much simpler matrix visual with only a single source table, with one row field, one value field, and one visual calculation in the matrix values *does* behave correctly when non-vc values are filtered:
There's clearly something weird going on with the more complex matrix I've built which has multiple source tables.
- Elena_Kalina2 days ago
Solution Sage
Hi wcarter ,
Fair pushback, and I apologize. I should be upfront — I used AI to help structure my previous reply based on my own thoughts, but clearly, I didn't dig deep enough into your specific issue. That's on me.
You're absolutely right. The docs only restrict filtering by the visual calculation, not other Value fields. Your simple matrix proves that perfectly.
So the error you're seeing is likely a bug or an edge case tied to how multiple tables interact with the visual calculation engine in your complex matrix.
Sahir's suggestion is definitely your best bet here — putting the logic into a DAX measure that returns BLANK() bypasses the visual filter conflict completely. You'll just need to watch how the matrix handles those blank rows afterward.