Reply
lillianliyi
Regular Visitor
Partially syndicated - Outbound

How to Hide rows in Matrix Chart using Parent Child Hierarchy

Hi Experts, I have read and tried many different ways to implement below, but just can't get it right. I may very well be missing something obvious

 

Desired Result: in Matrix Chart, for rows, only show selected level together the levels under this selected level, but not showing rows above this selected level. 

 

What has tried:

 1. build a table: Entity Name List using Dax from table: Entity; Table Entity Name List has no relationship with Table Entity.

          Using EntityKey as slicer for selecting specific Entity, which will show in Matrix Chart. 

 2. build a measure: Total forSelectedEntity

 3. Creat Matrix Chart as below, the measure is showing fine for the selected entity, but the rows starting from level1. 

lillianliyi_0-1647885895450.png

 

The expected Chart should be as below:

lillianliyi_1-1647885986332.png

 Appreciated any help/suggestions. 

 

6 REPLIES 6
lillianliyi
Regular Visitor

Syndicated - Outbound

@v-shex-msft , thank you so much for helping. 

I do have a sample file in my local laptop folder, but not able to attach. I have replied the email from Power BI Community Administrator <mailer@us.khoros-mail.com> and attached the file. if this email address does not work for you, is there any other email which I can use ?

Please let me know if you have any question on this sample file.

 

I did use an unconnected table as the source of the slicer (Table: Entity Name List). 

As shown in mine post, the challenge is to how to hide the level1 and level2' s name in the row header ( the measure for level1 and level2 are blank, this is fine).

 

Again, Appreciated your help. 

lillianliyi

Syndicated - Outbound

HI @lillianliyi,

I test on your sample file and find I can't directly hide the parent level when you work with hierarchy fields. (these levels are interactive and the child level will also be removed if you hide the parent level)
Perhaps you can try to change your field structure like the following blog then you can use a filter to hide the corresponding level records.

Dynamic Attributes In A Power BI Report - P3 Adaptive

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Syndicated - Outbound

HI @lillianliyi,

You can upload a sample file to the network driver and share the link here or try to export these data to an excel sheet and paste the dummy table records here in table format.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
v-shex-msft
Community Support
Community Support

Syndicated - Outbound

HI @lillianliyi,

It sounds like you want to achieve custom filter effects on the matrix based on slicer selections, right? In my opinion, I think the default filter effect is not suitable for your reuqrement.

For this scenario, you can try to create an unconnected table as the source of the slicer then write a measure express to achieve your requirement and apply it to the matrix visual level filter.

Applying a measure filter in Power BI - SQLBI

If you are confused about the coding formula, can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Syndicated - Outbound

Hi Xiaoxin Sheng, 

Applying a measure filter is not applicable for solving the issue I am running into. 

 

Here is the link for the sample file: 

https://www.dropbox.com/s/6fgpekabzuf8rlt/How%20to%20Hide%20Levels%20in%20Matrix_byParentChildHierar...

Highly appreciated the help. 

 

Yi

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)