Forum Discussion
Iterative Parts List - How to generate useful hierarchies
Hi Anonymous ,
This is potentially a fairly in-depth process depending on your specific implementation/use case.
If you want to do this in DAX, then I would suggest looking into the PATH function family:
https://docs.microsoft.com/en-us/dax/parent-and-child-functions-dax
If you want to do this in Power Query, then I would suggest looking into functional transformation:
https://pivotalbi.com/dynamically-flatten-a-parent-child-hierarchy-using-power-query-m/
Pete
- Anonymous4 years agoNot applicable
Thank you very much for your answer and help.
And please excuse the late response, the project has been put on hold.
First a word about your second solution if I want to solve it with Power Query: The solution would be great, but due to the large amount of data it exceeds the calculation time and the update of the data set in the online service stops after about 2 hours of loading time.
For this reason I am now trying your first suggestion using DAX, the problem is that in the last iteration the Child ID can no longer be found in the Parent ID Column. The formula "Path" gives an error in this case.
Do you have any tips on how I can fix this problem or what I am doing wrong?
Thank you very much!
Here is another demo data set: https://we.tl/t-OXffAXhL3R