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
Please see below my dummy dataset.
I have many columns in my matrix, including Old City and New City. On the left side, I am using a slicer created via Field Parameter to select and rearrange columns dynamically.
What I want is one more slicer for Old and New:
If the user selects Old, the matrix should show the Old City column.
If the user selects New, the matrix should show the New City column.
I tried the approach suggested by GrowthNatives and Poojara_D12, but it didn’t solve my issue.
Unless you've found another solution, I believe adding a fourth grouping attribute to the field parameter will solve the issue. This fourth value will create a group under your field parameter that you can use to populate the New/Old slicer.
Here's an example:
Parameter = {
("Product Category", NAMEOF('Table'[Product Category]), 1, "New"),
("New City", NAMEOF('Table'[New City]), 2, "New"),
("Sum of Quantity", NAMEOF('Table'[Sum of Quantity]), 3, "New"),
("Product Category", NAMEOF('Table'[Product Category]), 4, "Old"),
("Old City", NAMEOF('Table'[Old City]), 5, "Old"),
("Sum of Quantity", NAMEOF('Table'[Sum of Quantity]), 6, "Old")
}