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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
tfeldt2020
Frequent Visitor

Hiding blank row headers in Matrix Hierarchies

I have a matrix with the row headers in a Hierarchy shown below:

 

tfeldt2020_0-1625838345343.png

 

These levels represent different accounts that roll up to the Chart Level 1 account. The problem is that not every account has a full 7 levels. This causes a blank row header to occur with a duplicate measure value as the previous chart level. How can I hide the extra in cases where it doesn't exist? I don't want to filter the data because then it will be missing from the rollup. I just want extra row with the blank level name to not show up in the matrix. Please see the example below:

 

tfeldt2020_1-1625838685983.png

 

 

 

1 ACCEPTED SOLUTION

Hi @tfeldt2020 ,

 

To hide the unwanted rows, for each row you must check whether the current level is available by the visited node. This can be accomplished by checking the depth of each node.

 

You can find the corresponding instructions here at SQLBI as "Basic parent-child pattern".

https://www.daxpatterns.com/parent-child-hierarchies/

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

1 REPLY 1

Hi @tfeldt2020 ,

 

To hide the unwanted rows, for each row you must check whether the current level is available by the visited node. This can be accomplished by checking the depth of each node.

 

You can find the corresponding instructions here at SQLBI as "Basic parent-child pattern".

https://www.daxpatterns.com/parent-child-hierarchies/

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.