Forum Discussion
How to Create Nested Field Parameters in Power BI Matrix (Show Columns Dynamically Based on Slicer)
- 10 months ago
Hi Mahendra_k ,
Thank you for the update, I see what you’re trying to do. Right now, Power BI doesn’t let you change the field position dynamically in a Matrix when using field parameters. You can swap which fields show up, but their order stays fixed once you’ve placed them. The only way to get different arrangements would be to create separate parameter setups. Hopefully this becomes more flexible in a future update.
Best Regards,
Community Support Team
Hi Mahendra_k, if I understood your request correctly you just need to add additional columns to your Field Parameter:
To do so you just have to add a comma at the end of each row in the Field Parameter definition before the closing bracket and type whatever category you want to assign it to. You can add as many columns as you need like this to create a hierarchy. The important note is just that all rows need to have the same amount of columns at the end.
Thank you for your answer, but I think there was a misunderstanding. This isn’t exactly what I was looking for.
- KarinSzilagyi10 months agoSuper User
Hi Mahendra_k If I understood correctly, you want to use some static columns + some columns that would switch based on your selection. You can do that with my solution above too since you can combine the dynamic columns in the field parameter with the static columns directly from the tables you want to use:
If I select "Table B" the columns FieldDate, PlannedCompletionDate, CreatedDate, StatusOriginal and Year-Quarter stay static and can be feely moved around as needed, while the column "CreatedDate" is added dynamically from the Field-Parameter:When I switch to "Table A" the columns FieldDate, PlannedCompletionDate, CreatedDate, StatusOriginal and Year-Quarter are still static, "CreatedDate" disappears and "Sort" + "Status" are added instead of "CreatedDate" from the Field-Parameter:
Here you can see it in action:
Was this what you were looking for?- Mahendra_k10 months agoHelper I
Hi,
Thank you for your answer, but I think there was a misunderstanding. This isn’t exactly what I was looking for.
I already have a field parameter in my report that includes multiple columns, and this parameter is being used in a Matrix visual.
Within this field parameter, I have two specific columns — Old City and New City. I want to switch between these two dynamically based on a slicer selection, while keeping the field parameter fully functional in the Matrix.
For example:
Suppose my field parameter includes the following fields:
Category
Old City
New City
Quantity (Sum)
I have added a City Type slicer with two options:
Old
New
Now, here’s how it should behave:
If the user selects Old, the Matrix should display:
Category | Old City | Sum of Quantity
Furniture | Mumbai | 120
Electronics | Delhi | 200
Clothing | Pune | 150
If the user selects New, the Matrix should automatically switch to:
Category | New City | Sum of Quantity
Furniture | Bengaluru | 180
Electronics | Hyderabad | 250
Clothing | Chennai | 170
All other columns from the field parameter (like Category and Quantity) should remain as they are — only the City column (Old/New) should change dynamically based on the slicer selection.