Forum Discussion
Creating a dynamic filter in Matrix table
For this you need a "Disconnected Slicer" because normal slicer will filter both rows and columns.
Try this:
1. Create a new table with no relationships:
Modeling > Enter Data
Table Name: SlicerSystem
Column: System
Values: System 1, System 2, System 3
2. Create this DAX measure:
ShowRow =
VAR SelectedSys = SELECTEDVALUE('SlicerSystem')
RETURN
SWITCH(
SelectedSys,
"System 1", IF(MAX('Table1'[System 1]) = 1, 1),
"System 2", IF(MAX('Table1'[System 2]) = 1, 1),
"System 3", IF(MAX('Table1'[System 3]) = 1, 1),
1
)
3. On your Matrix visual:
Add SlicerSystem[System] as Slicer
Add ShowRow to Filters pane > Show items when value is 1[System]
Result:
If you select System 1 in slicer, it will show only ReportID 1 and 2.
But all System 1, System 2, System 3 columns will still be visible.
Note: Replace 'Table1' with your actual table name.
This works in Semantic model without creating any new table in source.
Let me know if it works!