Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Contributor

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
Highlighted
MVP
MVP

Re: Hierarchy :not working

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
Highlighted
MVP
MVP

Re: Hierarchy :not working

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

Highlighted
Contributor

Re: Hierarchy :not working

Thanks