Forum Discussion
willtunechi
2 years agoFrequent Visitor
Return all components in a bom structure
I'm trying to create a table in BI where I search for a specific item and it returns all the components of that item and the components of the components (which can be several items), below is an exa...
barritown
Solution Sage
2 years agoHi willtunechi,
If you have only one level in your hierarchy and need to perform this operation only for "123", you can create a new table like this:
In plain text:
New Table =
VAR _tbl = UNION ( SELECTCOLUMNS ( FILTER ( Data, [Item] = 123 ), "Component", [Component] ),
{ 123 } )
RETURN CROSSJOIN ( SELECTCOLUMNS ( { 123 }, "Item", [Value] ),
SELECTCOLUMNS ( FILTER ( Data, [Item] IN _tbl ), "Component", [Component] ) )
Best Regards,
Alexander
- willtunechi2 years agoFrequent Visitor
Thanks for the answer, there will be more than 10 levels
- barritown2 years ago
Solution Sage
Missed that point, sorry.
I'd use PATH then, but it doesn't accept multiple parents as in your case.