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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Jidapa18
Frequent Visitor

Remove blank row level in Matrix visual and keep the data

Hi, I have a hierarchy with 9 levels that I created in a matrix visual. However, the matrix always shows blank rows at the lower levels.
I want the matrix to show only the levels that actually contain data.
For example, if the data only goes up to Level 7, I don’t want Level 8 and Level 9 to appear as blank rows.

Jidapa18_0-1768878106014.pngJidapa18_1-1768878133445.png

This is example data, I try to do as per this solutin https://community.fabric.microsoft.com/t5/Desktop/Remove-blank-rows-from-matrix-but-still-contain-da... still work but not effective,

It may have another, more effective method. I would appreciate it.

Thank you 
1 ACCEPTED SOLUTION

Hi @Jidapa18 ,
Thanks for sharing the comparison and screenshots.

What you’re seeing in the “Remove Blank Row Level” visual is expected. When a level is removed because it has no value, it is no longer part of the matrix. When you expand or drill, only the remaining visible levels are used, so some parent levels can be skipped even though the lowest level still shows a value.

 

In the “Not Remove Blank Row Level” case, all levels are kept, so the full expand path is shown. This isn’t caused by the measure, since the value is correct in both visuals. It’s a limitation of how the matrix works when parent levels are hidden.

 

If you need the expand or collapse behavior to stay consistent, the parent levels must remain visible. Once they are removed, they can’t be brought back during drill.

 

As an alternative, you can switch the matrix layout to Tabular. This shows each level in its own column and avoids expanding into empty leaves. It changes the layout and doesn’t keep the stepped drill behavior, but it can work depending on the requirement.

 

Hope this helps clarify the behavior and available options.

View solution in original post

8 REPLIES 8
danextian
Super User
Super User

I created that solution. It works but not effective? You need to tell us why it isn't.





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.

Hi @danextian Your solution can solve my problem before but for now I found one issue that need to be improve, I compare for both side are "Remove Blank Rows" and "Not Remove Blank Rows" as picture

Jidapa18_1-1768913282057.png

In this picture if you see in the row Subway both side will show value OR-5, but when I click drill up or drill down for expand or collaspe level in the "Remove blank row side" not show the level before the value, I compare as the picture.

Jidapa18_2-1768913427941.png

So If you can help me for solve this issue, It would be appreciate.

Thanks a lot.

Hi @Jidapa18 ,
Thanks for sharing the comparison and screenshots.

What you’re seeing in the “Remove Blank Row Level” visual is expected. When a level is removed because it has no value, it is no longer part of the matrix. When you expand or drill, only the remaining visible levels are used, so some parent levels can be skipped even though the lowest level still shows a value.

 

In the “Not Remove Blank Row Level” case, all levels are kept, so the full expand path is shown. This isn’t caused by the measure, since the value is correct in both visuals. It’s a limitation of how the matrix works when parent levels are hidden.

 

If you need the expand or collapse behavior to stay consistent, the parent levels must remain visible. Once they are removed, they can’t be brought back during drill.

 

As an alternative, you can switch the matrix layout to Tabular. This shows each level in its own column and avoids expanding into empty leaves. It changes the layout and doesn’t keep the stepped drill behavior, but it can work depending on the requirement.

 

Hope this helps clarify the behavior and available options.

Hi @Jidapa18 ,

Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.


Thank you.

Hi @Jidapa18 ,

We wanted to kindly follow up regarding your query. If you need any further assistance, please reach out.


Thank you.

ryan_mayu
Super User
Super User

@Jidapa18 

could you pls provide some sample data and expected output?





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

Proud to be a Super User!




Hi @ryan_mayu  for the sample data I provided as the link above from the preevious question.
for now I want the output show like thoses picture below,

Jidapa18_3-1768913660701.png

Jidapa18_4-1768913667927.png

The expected outcome should be can be remove blank row and can show the level before the data when I drill down or drill up the matrix.

Thanks

rohit1991
Super User
Super User

Hii @Jidapa18 

 

In a Matrix visual, Power BI always renders all hierarchy levels added to the Rows well, even when lower levels contain no data. This behavior is by design and cannot be controlled using “Show items with no data” or simple blank filters. The recommended approach is to control row visibility using a measure and apply it as a visual-level filter.

 

Has Data =
IF ( NOT ISBLANK ( [Your Main Measure] ), 1, BLANK() )

 

Add this measure to Filters on this visual and set it to is not blank. This ensures that only hierarchy levels that actually contain data are shown, and empty lower levels are hidden automatically.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.