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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MoMoZA
Frequent Visitor

Hierachy and disconnected table question

I will try to keep this as brief and summarized as possible.

 

I have 2 tables that are disconnected.

 

The first table is one that purely has columns which define a hierarchy. 

AreaBusiness UnitPortfolioSubportfolio
Area 1BU1PO1SP1
Area 1BU1PO2SP2
Area 1BU2PO3SP3
Area 1BU2PO4SP4

 

From the table above I create a hierarchy and hide the actual columns in Reoprt View.

 

A simplified version of the second table is like this:

DateLevelResult
2020-03-31Area 11,000,000
2020-03-31BU1500,000
2020-03-31BU2800,000
2020-03-31PO1300,000
2020-03-31PO2400,000
2020-03-31SP1200,000
2020-03-31SP2200,000

 

Don't worry about the numbers for now.

 

In a Matrix visual, I want to be able to drop the hierachy on the rows (obviously with drilldown enabled) and have a DAX measure in the Values section of the matrix that will look up the correct value for each level of the hierarchy, no matter how far down the user drills.

 

I'm having trouble with creating this measure.

 

Can anyone assist?

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

Can you post what you have in terms of a measure calculation? You definitely need to be using ISINSCOPE. https://docs.microsoft.com/en-us/dax/isinscope-function-dax



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Yeah I figured as much that ISINSCOPE is the key but I can't wrap my head around how to get it into a measure.

 

At the moment, I've created 4 measures, each one doing an "ISINSCOPE" for each level of the hierachy:

 

IsInscope Area = ISINSCOPE( 'Hierarchy)'[Area] )

IsInscope Business Unit = ISINSCOPE( 'Hierarchy)'[Business Unit] )

IsInscope Portfolio = ISINSCOPE( 'Hierarchy)'[Portfolio] )
IsInscope Subportfolio = ISINSCOPE( 'Hierarchy)'[Subportfolio] )
 
Now I need a master measure that refers to these.
I know I'm close but just can't think of how.

Generally,

 

Measure =
  SWITCH(TRUE(),
    ISINSCOPE('Hierarchy'[Area]),SUMX(FILTER('Table','Table'[Level]=MAX('Hierarchy'[Area]),[Result]),
    ISINSCOPE(...)
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.