This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello,
I am having issues trying to toggle what fields are visible in my matrix visual. I cannot share specifics about my data, but will give an example:
I have data sales by state by year. In my matrix, I have my rows as the year, my columns as the state, and I want to display 2 fields in my values field. 1, the sales by each state in each year. This is a non-issue. The other is a calculated measure, %YoY change. I wasnt users to be able to toggle whether or not they see this %chg value displayed in the matrix, but I am having issues figuring out how to do this.
I have already used a slicer to turn the values from visible to BLANK depending on if "Show %chg" is selected as "Yes". However, I would ideally like for a way to completely remove that from visibility in the matrix, instead of just having a blank values column. Is there any way to do this?
Thank you
Solved! Go to Solution.
Hi @rdurrell ,
You can achieve this by using Field Parameters in Power BI. Instead of just blanking out the values when the user selects "No" for showing %YoY Change, Field Parameters allow you to dynamically control which fields appear in the matrix, effectively removing the column entirely when not selected.
First, create a Field Parameter by going to the Modeling tab and selecting New Parameter → Fields. Name the parameter something like "Matrix Toggle" and select the fields you want to toggle (e.g., Sales and %YoY Change). Power BI will generate a new table with a DAX expression similar to the following:
Matrix Toggle = {
("Sales", NAMEOF('Sales Table'[Sales]), 0),
("%YoY Change", NAMEOF('Sales Table'[%YoY Change]), 1)
}
This table acts as a toggle, allowing users to select which measures appear in the matrix. Next, remove the existing measures from the Values section of your matrix and instead, add the newly created Matrix Toggle field. The field parameter table also creates a slicer, where users can choose which values to display.
When the user selects "Sales", only the Sales measure appears in the matrix. If they select both "Sales" and "%YoY Change", both fields appear dynamically. If %YoY Change is not selected, it completely disappears rather than showing a blank column.
If you want to enhance the user experience, change the slicer to a Single Select dropdown to make it a simple toggle. If you want users to select multiple fields, leave it as a Multi-Select slicer. This approach is far better than using a measure with BLANK() because it fully controls field visibility in the matrix.
Best regards,
Hi @rdurrell ,
You can achieve this by using Field Parameters in Power BI. Instead of just blanking out the values when the user selects "No" for showing %YoY Change, Field Parameters allow you to dynamically control which fields appear in the matrix, effectively removing the column entirely when not selected.
First, create a Field Parameter by going to the Modeling tab and selecting New Parameter → Fields. Name the parameter something like "Matrix Toggle" and select the fields you want to toggle (e.g., Sales and %YoY Change). Power BI will generate a new table with a DAX expression similar to the following:
Matrix Toggle = {
("Sales", NAMEOF('Sales Table'[Sales]), 0),
("%YoY Change", NAMEOF('Sales Table'[%YoY Change]), 1)
}
This table acts as a toggle, allowing users to select which measures appear in the matrix. Next, remove the existing measures from the Values section of your matrix and instead, add the newly created Matrix Toggle field. The field parameter table also creates a slicer, where users can choose which values to display.
When the user selects "Sales", only the Sales measure appears in the matrix. If they select both "Sales" and "%YoY Change", both fields appear dynamically. If %YoY Change is not selected, it completely disappears rather than showing a blank column.
If you want to enhance the user experience, change the slicer to a Single Select dropdown to make it a simple toggle. If you want users to select multiple fields, leave it as a Multi-Select slicer. This approach is far better than using a measure with BLANK() because it fully controls field visibility in the matrix.
Best regards,
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 24 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 50 | |
| 33 | |
| 24 | |
| 24 |