Forum Discussion
lionx
3 years agoHelper I
Fix errors for flatten BOM Parent-Child Hierarchy using PATH function
I'm trying to visualize the Bill of Materials dataset in power BI. However, when I use the PATH function to flatten the BOM Parent-Child Hierarchy, it comes up with the error as follows. Any s...
lionx
3 years agoHelper I
I have tried to fix the issue using the DAX. First I detect the missing assemblies as follows:
Missing assemblies =
CALCULATETABLE(
SUMMARIZE(
'Item',
'item'[no],
'item'[description],
'item'[Inventory],
"Assembly id", BLANK(),
"Quantity per", 1
),
FILTER( 'item', NOT( 'item'[no] IN ALL( 'bomComponent'[no] )))
)
Then, I create the Hierachical assemblies table that includes all the missing values of 'parentItemN'o in the the 'no' column:
Hierachical assemblies =
UNION(
SELECTCOLUMNS(
'bomComponent',
"Assembly id", 'bomComponent'[parentItemNo],
"Component description", 'bomComponent'[description],
"Component id", 'bomComponent'[no],
"Quantity per", 'bomComponent'[quantityPer]
),
SELECTCOLUMNS(
'Missing assemblies',
"Assembly id", 'Missing assemblies'[Assembly id],
"Component description", 'Missing assemblies'[description],
"Component id", 'Missing assemblies'[no],
"Quantity per", 'Missing assemblies'[Quantity per]
)
)
However, It come up with another issue as captured below:
Does my DAX code is correct? I see the topic below is the same but has not resolved yet.