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
wsindharta
Frequent Visitor

Parents - Child Hierarchy for Bill of Materials

Hi i have two question, appreciate if you can help me.

 

a. I'm trying to create a visualization for Bill of Materials in power BI, however there are few child that have multiple parents, so it prevent me creating path using DAX function. i attached the screen shot of error.

 

 Capture.PNG

 

b. i ignore those part number with multiple parents, first and this is the 2nd problem, on visualization, especially for level 3 onward. there's blank value, which is from level 1 and level 2. below is the table and visualization. is there anyway to solve this ?

blank here basically level 2 part number.

 

Capture2.PNG

1 ACCEPTED SOLUTION
wsindharta
Frequent Visitor

All,

 

thanks for reply, unfortunately to change the structure will be very tedious job, as in actual scope the level of hieararchy can be as long as 12 level, and the multiple child happen at different level.

 

i found one link that solve the problem

 

https://www.thebiccountant.com/2017/02/14/dynamically-flatten-parent-child-hierarchies-in-dax-and-po...

 

 

View solution in original post

5 REPLIES 5
wsindharta
Frequent Visitor

All,

 

thanks for reply, unfortunately to change the structure will be very tedious job, as in actual scope the level of hieararchy can be as long as 12 level, and the multiple child happen at different level.

 

i found one link that solve the problem

 

https://www.thebiccountant.com/2017/02/14/dynamically-flatten-parent-child-hierarchies-in-dax-and-po...

 

 

ChrisMendoza
Resident Rockstar
Resident Rockstar

@wsindharta,

 

PATH ( ) [ID} should be unique. something more like:

IDParent
A 
BA
CA
DA
EA
FA
GA
B1B
B2B
B3B
C1C

 

I have used https://www.daxpatterns.com/parent-child-hierarchies/ several times in my own projects as a resource. Maybe it will work for you if you can change your data structure.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Hi @wsindharta,

 

 

Could you please mark the proper answers as solutions?

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@ChrisMendoza

 

i've been trying to follow step by step instruction from the link, but can't get it right. and the sample there didn't cover multiple parents child hierarchy...

 

Hi @wsindharta,

 

So what's the result that you expected? Since there are multiple values in the path, we can't use the function PATH here. Please refer to dax/path-function-dax.

parents_child

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the 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.