Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
StevenT
Helper V
Helper V

Matrix - Hide/Show secondary Rows in matrix

Hi, is there a way to dynamically hide/show a secondary dimension in a matrix, depending on what a user chooses in a field parameter?  

1 ACCEPTED SOLUTION

Things are getting clearer now, you can’t make a field parameter itself add/remove extra levels, but you can simulate it., create a conditional field (measure) that only returns TrackList[Title] when the selected parameter = “Artist,” and returns BLANK() otherwise, then add that measure as the second row in your matrix. Power BI automatically hides a matrix level if it only contains blanks, so the secondary row will appear only when “Artist” is chosen.

Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡

🟩 Follow me on LinkedIn

View solution in original post

9 REPLIES 9
v-pgoloju
Community Support
Community Support

Hi @StevenT,

 

Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

 

v-pgoloju
Community Support
Community Support

Hi @StevenT,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @danextian@DavidHenry @DataVitalizer and @lbendlin  for prompt and helpful responses.

Just following up to see if the Response provided by community members were helpful in addressing the issue. if the issue still persists Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

 

DavidHenry
Regular Visitor

Yes — you can manage this using field parameters in Power BI. Create a field parameter for your secondary dimension, then use a slicer to let users pick which one to show. The matrix will automatically update based on that selection.

DataVitalizer
Solution Sage
Solution Sage

Hi @StevenT 

 

You can let users pick dimensions with a field parameter. If they choose Product Category, you add a simple DAX rule so Segment shows up under it. If they pick Country, that rule hides Segment the matrix then adapts naturally to their choice.

 

Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡

 

🟩 Follow me on LinkedIn

I use a field parameter for the primary level (first row). How would I build it so that if a user picks one from the main parameter, a secondary row appears or hides if there is no secondary needed?
Here's my field parameter

Category = {
    ("Title", NAMEOF('TrackList'[Title]), 0),
    ("Genre", NAMEOF('Genre'[Genre]), 1),
    ("Artist", NAMEOF('Artist'[Artist]), 2),
    ("Album", NAMEOF('Album'[Album]), 3),
    ("Record Label", NAMEOF('RecordLabel'[RecordLabel]), 4),
    ("Region", NAMEOF('Region'[Region]), 5),
    ("Retail Sales - Tracks", NAMEOF('PurchasedFrom'[PurchasedFrom]), 6),
    ("Retail Sales - Albums", NAMEOF('PurchasedFrom'[Purchased From]), 7)
}
what I would want is something like  if the pick artist, the secondary row appears which would be  TrackList([Title]), but if they pick any other, it dissapears or is hidden in the matrix..

hi @StevenT 

You are talking about secondary rows but in a matrix viz, each of those fields will have its own hierarchy and only one will be secondary. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Things are getting clearer now, you can’t make a field parameter itself add/remove extra levels, but you can simulate it., create a conditional field (measure) that only returns TrackList[Title] when the selected parameter = “Artist,” and returns BLANK() otherwise, then add that measure as the second row in your matrix. Power BI automatically hides a matrix level if it only contains blanks, so the secondary row will appear only when “Artist” is chosen.

Did it work? 👍 A kudos would be appreciated
🟨 Mark it as a solution to help spread knowledge 💡

🟩 Follow me on LinkedIn

lbendlin
Super User
Super User

Not sure what you mean by secondary row, but you can hide hierarchy elements by collapsing them and not showing the +/- icons.

 

Consider instead allowing "Personalize Visuals"  and teaching your report users how to operate that.

I use a field parameter for the primary level (first row). Works great.  But I would only want a secondary row under the selected one here, where if the user chooses for example, 
("Artist", NAMEOF('Artist'[Artist]), 2),
a secondary dimension is visible and it would be 
  ("Title", NAMEOF('TrackList'[Title])0),

So it would look like this if artist is selected, but if Region selected, then there wouldn't be a secondary dimension.

StevenT_0-1762526662177.png

Simply put, I wouldn't even a blank row to appear below the Entityselector field



Here's my field parameter

EntitySelectory = {
    ("Title", NAMEOF('TrackList'[Title])0),
    ("Genre"NAMEOF('Genre'[Genre]), 1),
    ("Artist", NAMEOF('Artist'[Artist]), 2),
    ("Album", NAMEOF('Album'[Album]), 3),
    ("Record Label", NAMEOF('RecordLabel'[RecordLabel]), 4),
    ("Region", NAMEOF('Region'[Region]), 5),
    ("Retail Sales - Tracks", NAMEOF('PurchasedFrom'[PurchasedFrom]), 6),
    ("Retail Sales - Albums", NAMEOF('PurchasedFrom'[Purchased From]), 7)
}

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.