Forum Discussion
How to Hide fields in matrix table if no selection in field parameters
- 8 months ago
We have not received a response from you regarding the query and were following up to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank You.
Hello ,
Thank you for the response . I will go with first option. I do have one more query . Is there a possibility to expand all rows automatically based on selection of field parameters or by default . I see that every time I need to right click on the data -->expand --> ALL . I need an alternative for this
- Aala_Ali8 months agoMost Valuable Professional
Hi again,
Glad the first option works!
About auto-expanding all rows in the matrix:
Power BI doesn’t currently support automatic expand-all, and field parameters don’t trigger expansion either. Each time the parameter changes, the matrix resets to the default collapsed view.What you can do:
Manually expand once and save a bookmark (but it won’t auto-expand when the selection changes).Use a Table visual instead of a Matrix if you don’t need hierarchy.
Or redesign the rows to avoid multiple levels.
Unfortunately, there’s no true “auto expand all” option in Power BI at the moment — it’s a product limitation.
Please ✔ Give a Kudo • Mark as Solution – help others too!
Aala Ali
Pricing & Profitability Specialist | Data Analyst at Zain Telecom
Group Leader – Microsoft Sudan Fabric User Grouplinked in profile: https://www.linkedin.com/in/aala-ali/
- PradeepSpowerbi8 months agoFrequent Visitor
okay . I have a table VIEW BY ATTRIBUTES COLUMNS along with other direct columns . I am trying to create a table but when I select none in parameters , the table is showing no data . It should show the data for other fields . How to achieve it
- Aala_Ali8 months agoMost Valuable Professional
Okay i got you, so the reason is that your table shows no data when you select None is because the parameter is returning a BLANK() value.
A blank value removes all rows in a table visual.
To fix this, we just need “None” to return an empty text column instead of a blank measure. That way:
The View By column becomes empty
But all your other columns still show normally
Here’s the exact DAX to use:
1. Create a helper table with an empty text column
HelperNone =
ADDCOLUMNS(
{ (1) },
"NoAttribute", ""
)This creates a column NoAttribute that always returns an empty string.
2. Update your field parameter to include the new “None” option
Replace your parameter table with this version (change YourTable to your real table name):
Attributes = {
("DRIVER ID", NAMEOF('YourTable'[Driver ID]), 0),
("DRIVER NAME", NAMEOF('YourTable'[Driver Name]), 1),
("LEADER NAME", NAMEOF('YourTable'[Leader Name]), 2),// Updated "None" option
("None", NAMEOF('HelperNone'[NoAttribute]), 3)
}
Result
Matrix → selecting “None” hides everythingTable → selecting “None” keeps the table visible and only empties the “View By” column
I hope this works for you 👌 please ✔ Give a Kudo • Mark as Solution – help others too!Aala Ali
Pricing & Profitability Specialist | Data Analyst at Zain Telecom
Group Leader – Microsoft Sudan Fabric User Grouplinked in profile: https://www.linkedin.com/in/aala-ali/