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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
akoren2
Advocate I
Advocate I

Pulling a value from a lower hierarchy in a matrix

Hi All!

 

I have a matrix with 4 levels. There are possible values on each one of those hierarchy levels. I need to display a flag on the top most hierarchy level (level 1) if there is a value that exists on any of the four levels. Does anyone have any tips on how to accomplish that? 

 

 

Thank you!

3 REPLIES 3
ExcelMonke
Super User
Super User

Could you show a screenshot of what the result looks like now?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





ExcelMonke
Super User
Super User

Hello,

You can consider using a mix of Variables and IF statements. Consider: 

MEASURE =
VAR _Level1 =
    IF ( ISBLANK ( 'Table'[Level1] ), 0, 1 ) //You can tweak the "ISBLANK" statement depending on how you are determining value for the level
VAR _Level2 =
    IF ( ISBLANK ( 'Table'[Level2] ), 0, 1 )
VAR _Level3 =
    IF ( ISBLANK ( 'Table'[Level3] ), 0, 1 )
VAR _Level4 =
    IF ( ISBLANK ( 'Table'[Level4] ), 0, 1 )
RETURN
    IF ( ( _Level1 + _Level2 + _Level3 + _Level4 ) > 0, "Flag", "" )




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks for your reply! 
I have tried something similar, but here it is with you structure. It still only displays the flag when the measure exists on that specific level 

Commentary Flag =
VAR _Level1 =
    IF ( ISINSCOPE(Rpt_Layout[LVL_1]) && NOT isblank([Commentary]) , 1, 0 )
VAR _Level2 =
    IF ( ISINSCOPE(Rpt_Layout[LVL_2]) && NOT isblank([Commentary]) , 1, 0 )
VAR _Level3 =
    IF ( ISINSCOPE(Rpt_Layout[LVL_3_Sort]) && NOT isblank([Commentary]) , 1, 0 )
VAR _Level4 =
    IF ( ISINSCOPE(Rpt_Layout[LVL_4]) && NOT isblank([Commentary]) , 1, 0 )
RETURN
    IF ( ( _Level1 + _Level2 + _Level3 + _Level4 ) > 0, "Flag", "" )

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.