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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

ISINSCOPE Hide Empty Rows in a Matrix Hierarchies

Hi Guys;

 

I need some  Help, I have a matrix with 7 Hierarchies Levels, and Total Quantity field, in the level 4, 5, 6 and 7, I have Rows Empty. The situation currently I only can remove the rows in the level 4 without affect the Total Quantity, but is there some way to use isinscope in the same measure for all levels (5,6,7) with rows empty?

 

This is my code for the Level 4:

Rows Blank = SWITCH(
    TRUE(),
    AND(
        ISINSCOPE(FACT_SOLPED_CON_EST_LIB[Desc. Sociedad N4]),
        ISBLANK(VALUES(FACT_SOLPED_CON_EST_LIB[Desc. Sociedad N4]))
    ),BLANK(),
    SUM(FACT_SOLPED_CON_EST_LIB[Cant. Sol Ped])
    )

This is my result inthe level 4, the Matrix works perfect!

 

Captura.PNG

 

But to add the next Level don´t works:

Captura2.PNG

 

Regards!

4 REPLIES 4
Gerish_Ramyead
Regular Visitor

For those looking for something similar. 

Parent-child hierarchies – DAX Patterns can be useful to consult.

v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

I try to produce your problem.

First, i want to confirm something:

In data below, when showing level1~level7, the second row should not show on the matrix, right?

If my example is not correct, could you show me a simple one?

level1 level2 level3 level4 level5 level6 level7 value
A AB ABC ABCD ABCDE ABCDEF ABCDEFG 1
A AB ABC ABCD ABCDE ABCDEF ABCDEFH  

 

Meanwhile, you could learn How to use ISINSCOPE in Hierarchies from the following video.

DAX for Power BI - Determining Hierarchy Level (ISINSCOPE)

If you still have problems, pleas let me know.

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi Maggie;

Thanks for the video was so helpful,  this is a complete example thaT I need to do:


Data Base
Captura 5.PNG

 

The Idea is make a visual Matrix and must work in this way:
Don´t show empty rows.
Respect the value and content in before levels
Respect the Total Value always

 

This is the way to show the Matrix in each change of hierarchies:

Captura 10.PNGCaptura 7.PNG

 

Im tryng whit this code but don´t work all well:

Medida = 
IF (
    SWITCH (
        TRUE (),
        AND ( ISINSCOPE ( Hoja6[Level 1] ), ISBLANK ( VALUES ( Hoja6[Level 1] ) ) ), BLANK (),
        SUM ( Hoja6[Value] )
    ),
    IF (
        SWITCH (
            TRUE (),
            AND ( ISINSCOPE ( Hoja6[Level 2] ), ISBLANK ( VALUES ( Hoja6[Level 2] ) ) ), BLANK (),
            SUM ( Hoja6[Value] )
        ),
        IF (
            SWITCH (
                TRUE (),
                AND ( ISINSCOPE ( Hoja6[Level 3] ), ISBLANK ( VALUES ( Hoja6[Level 3] ) ) ), BLANK (),
                SUM ( Hoja6[Value] )
            ),
            IF (
                SWITCH (
                    TRUE (),
                    AND ( ISINSCOPE ( Hoja6[Level 4] ), ISBLANK ( VALUES ( Hoja6[Level 4] ) ) ), BLANK (),
                    SUM ( Hoja6[Value] )
                ),
                IF (
                    SWITCH (
                        TRUE (),
                        AND ( ISINSCOPE ( Hoja6[Level 5] ), ISBLANK ( VALUES ( Hoja6[Level 5] ) ) ), BLANK (),
                        SUM ( Hoja6[Value] )
                    ),
                    IF (
                        SWITCH (
                            TRUE (),
                            AND ( ISINSCOPE ( Hoja6[Level 6] ), ISBLANK ( VALUES ( Hoja6[Level 6] ) ) ), BLANK (),
                            SUM ( Hoja6[Value] )
                        ),
                        IF (
                            SWITCH (
                                TRUE (),
                                AND ( ISINSCOPE ( Hoja6[Level 7] ), ISBLANK ( VALUES ( Hoja6[Level 7] ) ) ), BLANK (),
                                SUM ( Hoja6[Value] )
                            ),
                            SWITCH (
                                TRUE (),
                                AND ( ISINSCOPE ( Hoja6[Level 7] ), ISBLANK ( VALUES ( Hoja6[Level 7] ) ) ), BLANK (),
                                SUM ( Hoja6[Value] )
                            )
                        )
                    )
                )
            )
        )
    )
)

In advance thanks for your time!

 

Hi @Anonymous 

As tested, it seems impossible to hide the blank rows on "Row header".

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors