Forum Discussion
Creating a dynamic filter in Matrix table
The key is to filter which Report ID rows show up, without filtering the System columns themselves - a normal slicer on your real System field will do both at once, which isn't what you want. The standard fix is to drive the row filter from a small, separate disconnected table instead of the real System dimension.
1. Add a lightweight local table via "Enter Data" (this stays local to your report/composite model and doesn't require creating anything in the underlying certified semantic model) called "System Selector" with one column listing System 1, System 2, System 3. Put this in your slicer instead of the real System field.
2. Add a measure that checks, for the Report ID in the current row, whether the flag for whichever system is selected equals 1:
ShowRow =
VAR Sel = SELECTEDVALUE('System Selector'[System])
RETURN
IF(
SWITCH(
Sel,
"System 1", [System1 Count] > 0,
"System 2", [System2 Count] > 0,
"System 3", [System3 Count] > 0,
TRUE()
),
1, 0
)
3. Apply ShowRow as a visual-level filter on the matrix (ShowRow is 1).
Because the slicer now filters a disconnected table rather than the real System column, the matrix still displays System 1/2/3 as separate columns for every row that passes the filter - you just get fewer Report ID rows, with all system columns intact for those rows, exactly like your second example table. If you don't have permission to add even a local Enter Data table on top of the live connection, let us know and we can look at a measure-only alternative using a parameter-less approach.