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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
PCI_Powerbi
New Member

Hierarchal Relationships

Hello, 

Helping a colluege on an issue that I believe deals with hierarchal relationships between tables? I've spent some time trying to solve this but have been stumped so far. Any and all input is welcome.

 

The problem resolves around determining an investors total position based on their various investments. The trick lies in where an investor is invested in a certain entity which in turn is invested in another entity.  See sample data below.  While currently shown in 3 individual tables ideally the data would live in one table and you could extract a total investment for each individual investor.

PCI_Powerbi_0-1739386230528.png

Let me know what you think!

1 ACCEPTED SOLUTION
OwenAuger
Super User
Super User

Hi @PCI_Powerbi 

PBIX with some suggestions attached.

 

1. I would suggest you structure your source data as a table containing all direct investment Ownership values by Investor/Investee:

OwenAuger_0-1739421612146.png

2. Then in Power Query self-join this table iteratively to produce all investment paths, multiplying the Ownership value at each step. There are some additional classification columns added (see the M code in PBIX).

The result is a table containing all investment "paths" where Ownership is the product of the direct Ownership values along that path.

OwenAuger_4-1739422619668.png

 

3. To produce your sample output, you would filter on Investor Type = "Top Level" and Investee = "Company A"

OwenAuger_3-1739422591279.png

 

There are likely some tweaks needed to support your reporting needs but hopefully this is a start.

 

(apologies @amitchandak , I saw you also replied just before I did)

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

View solution in original post

4 REPLIES 4
OwenAuger
Super User
Super User

Hi @PCI_Powerbi 

PBIX with some suggestions attached.

 

1. I would suggest you structure your source data as a table containing all direct investment Ownership values by Investor/Investee:

OwenAuger_0-1739421612146.png

2. Then in Power Query self-join this table iteratively to produce all investment paths, multiplying the Ownership value at each step. There are some additional classification columns added (see the M code in PBIX).

The result is a table containing all investment "paths" where Ownership is the product of the direct Ownership values along that path.

OwenAuger_4-1739422619668.png

 

3. To produce your sample output, you would filter on Investor Type = "Top Level" and Investee = "Company A"

OwenAuger_3-1739422591279.png

 

There are likely some tweaks needed to support your reporting needs but hopefully this is a start.

 

(apologies @amitchandak , I saw you also replied just before I did)

 

Regards


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Thank you very much! This looks like it will get me on the right track.

amitchandak
Super User
Super User

@PCI_Powerbi , You should add company column in each table and append them togther in Power Query

 

Or add company column and Join with Dimension, COmpany and Inversor and then analyze them together

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for the info!

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors