Forum Discussion
Dynamically Change Matrix Rows Based on Slicer Selection in Power BI from Multiple tables
- 1 year ago
Hey danishrizvi
Thinking maybe Field Paramters could work.Here's a quick example I created and a link to a Microsoft resource page: Implement data translation using field parameters
- 1 year ago
I tried this approach, and it worked flawlessly. The solution is straightforward: I used a field parameter and added all the required columns to it. I renamed the field parameters based on the slicer I was using on the page. Then, I created a 1:* relationship between the field parameter and my slicer table to filter the data. I ensured this relationship was active so the values displayed correctly based on the slicer selection.
I used the field parameter in my rows, allowing the table's column to dynamically change based on the slicer selection.
To dynamically change Matrix rows based on slicer selection:
Combine Tables:
Append Site 1, Site 2, and Site 3 tables into a single table in Power Query. Add a Site column to identify the source.Example table structure:
Keywords Clicks Impressions SiteKeyword 1 100 1000 Site 1 Keyword A 50 300 Site 2 Create a Slicer:
Use the Site column in a slicer for site selection.Configure Matrix Visual:
- Add Keywords to Rows.
- Add metrics (e.g., Clicks, Impressions) to Values.
Optional: Enable single-select in the slicer for cleaner filtering.
This approach dynamically updates rows based on slicer selection.