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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

multiple parent child relationship

Hi PowerBI guru,

 

I have a hierachy where some children have 2 parents.

 

child id, parent id

1, 2

1, 3

2,

3,

 

The way I resolve is to split the hierachy into 2 sub-hierarchies tables so that i can make sure all child ids are unique in each sub-hierarchy to apply the path function on powerBI - as follows:

 

hierarchy 1

1,2

2,

3,

 

hierarchy 2

1,3

2,

3,

 

What if my hierarchy has  some children having more than 2 parents and let say 10 parents,  the method I mentioned above is not scalable because split them into 10 sub-hierarchies to make child id unique is not ideal.

 

I wonder if there are any best practice to resolve the issue above?

 

 

 

 

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi,

 

what i want is to apply path method, and expect the following result:

child id, parent id, path

1, 2 , 2|1

1, 3 , 3|1

2,  , 2

3, , 3

 

however, it is not possible because powerBI will complain there are duplicated id = 1 in the hierarchy.

 

HI @Anonymous,

AFAIK, current path functions are not able to be analyzed these types of parent-child relationships.

PATH function (DAX) - DAX | Microsoft Docs

BTW, path functions are special information analysis functions, you can't do customize or add filters to affect the calculations.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Is there a walkaround for this issue?

 

Hi @Anonymous,

You can take a look at the following blog about use Dax to handle multiple parent child hierarchy if it helps:

Using Dax To Handle Multiple Parent Hierarchies - P3 Adaptive
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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