Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
gizzel123
Creator
Creator

Hierarchy :not working

Hi Guys,

I am trying to create a hierarchy with child and parent nodes. But the Path is not creating.

Could you please help.

Thanks.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Your root nodes should be listed as child without a parent, e.g. by using

BOM:
LOAD BOM_ASSEMBLY_PRODUCT,
    BOM_COMPONENT_PRODUCT,
    BOM_PARENT,
    BOM_CHILD,
    BOM_QTY_COMPONENT
FROM
[BOM_QVD.QVD]
(qvd);

CONCATENATE (BOM)
LOAD BOM_PARENT as BOM_CHILD,
  NULL() as BOM_PARENT,
BOM_ASSEMBLY_PRODUCT as BOM_COMPONENT_PRODUCT
RESIDENT BOM WHERE NOT EXISTS(BOM_CHILD,BOM_PARENT);

BOM_HIER:
Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT, BomAssemblyName,BOM_COMPONENT, Path, '/', Depth)
//Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT,  [ParentName], [PathSource], [PathName], '/', [Depth])
LOAD
BOM_CHILD,
BOM_CHILD AS BOM_COMPONENT,
BOM_PARENT AS BOM_ASSEMBLY
RESIDENT BOM;

View solution in original post

2 Replies
swuehl
MVP
MVP

Your root nodes should be listed as child without a parent, e.g. by using

BOM:
LOAD BOM_ASSEMBLY_PRODUCT,
    BOM_COMPONENT_PRODUCT,
    BOM_PARENT,
    BOM_CHILD,
    BOM_QTY_COMPONENT
FROM
[BOM_QVD.QVD]
(qvd);

CONCATENATE (BOM)
LOAD BOM_PARENT as BOM_CHILD,
  NULL() as BOM_PARENT,
BOM_ASSEMBLY_PRODUCT as BOM_COMPONENT_PRODUCT
RESIDENT BOM WHERE NOT EXISTS(BOM_CHILD,BOM_PARENT);

BOM_HIER:
Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT, BomAssemblyName,BOM_COMPONENT, Path, '/', Depth)
//Hierarchy (BOM_CHILD, BOM_ASSEMBLY, BOM_COMPONENT,  [ParentName], [PathSource], [PathName], '/', [Depth])
LOAD
BOM_CHILD,
BOM_CHILD AS BOM_COMPONENT,
BOM_PARENT AS BOM_ASSEMBLY
RESIDENT BOM;

gizzel123
Creator
Creator
Author

Thanks