Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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. 

 

The expected Chart should be as below:

 Appreciated any help/suggestions. 

 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous,

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous , 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 <[email protected]> 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