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.
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?
Hi,
Share some data and show the expected result.
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |