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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
peterg0417
Helper III
Helper III

Matrix visual and Multiple Hierarchy levels...with a twist

So in a "normal" data model you'd have something like this:
Subcategory -> Category -> Group

 

Which is easy to deal with. 

 

But how do you display the data in a clean fashion (meaning no blank rows in a matrix) when you have a situation like this:

Subcategory -> Category -> Group

and

Subcategory -> Group

 

In my DimCategory table, there are instances where the Category is null (and situations where it is not), but when I drop the data into a matrix visual (along with a SUM measure), it looks like this:

peterg0417_0-1702566324602.png

 

But I want it to look like this:

peterg0417_1-1702566382272.png

 

And then for situations where are 3 levels are needed - display all 3.

 

I know the Italians over at DAX patterns did something similar - but their example doesn't deal with null categories in the middle of a hierarchy. Only with various levels of depth.

 

Has anyone dealt with something like this before?

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

In the filter pane, just apply a condition on the SUM measure of non blanks.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

In the filter pane, just apply a condition on the SUM measure of non blanks.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

It's the same thing.  Let go of the notion of Subcategory -> Category -> Group and change your thinking to Level 1 -> Level 2 -> Level 3 (optional)

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.