Forum Discussion
Creating a dynamic filter in Matrix table
As i understand you need to have a slicer and when user selects System 1 in that slicer, show only Report IDs that are associated with System 1, but keep all System columns visible in the matrix.
I suggest:
1. Create a Disconnected Slicer Table (via DAX)
Since you mentioned you cannot create physical tables easily, create this as a calculated table in the semantic model:
System Slicer = DISTINCT ( 'Table 2'[System Name] )- This table should NOT have any relationship to your other tables.
2. Create the Row Filter Measure
Report Has Selected System = VAR SelectedSystems = VALUES ( 'System Slicer'[System Name] ) RETURN CALCULATE ( COUNTROWS ( 'Table 2' ), 'Table 2'[System Name] IN SelectedSystems, ALLEXCEPT ( 'Table 1', 'Table 1'[Report ID] ) ) + 0
3. Apply to the Matrix Visual
- Select your Matrix visual.
- In the Filters pane → Filters on this visual.
- Drag the measure Report Has Selected System into the filters.
- Set the filter to is 1.
Now when the user selects one or more systems in the slicer, the matrix will:
- Filter the rows (Report IDs) to only those associated with the selected system(s)
- Keep all columns (System 1, System 2, System 3, etc.) visible
Slicer Setup
- Use the System Slicer table in a Dropdown or List slicer.
- Allow multi-select if needed.
Alternative (If you cannot create the calculated table)
You can use the original 'Table 2'[System Name] in the slicer, but then you must use Edit interactions to stop the slicer from filtering the matrix directly, and rely only on the measure above. However, the disconnected table approach is much cleaner.
This seems to be solution I might be looking for, but could you please help me creating same without any table as we are not allowed to do so. That will be great help I think that might required chnages in report has selected source system.
- v-shchada-msft3 months agoCommunity Support
Hello jainmohit_0710,
Thank you for posting your query in the Microsoft Fabric Community Forum.If a disconnected slicer table cannot be created, using System Name as both slicer and Matrix columns is not recommended, as Power BI will filter the column axis and may collapse system columns.
If you are not able to create a separate table in your environment, as a workaround Systems can be represented as individual measures instead of columns, with Report ID in rows and each measure evaluating system membership from the ReportSystemMapping table (returning 1/0).
This approach works for small or static datasets only, as it is not scalable and requires manual maintenance for each new system.
Overall, the disconnected slicer pattern remains the best practice for scalable and reliable models.
please Refer below pbix file.
Thank you.