Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create hierchy for child having multiple parents

hi all

i have data in which i want create Hierarchy which is having multiple parent and Multiple Child\

i have Attched data file

and image also the Hierarchy which i want to create

plz help

thanks and regardshie.png

1 Reply
hic
Former Employee
Former Employee

You need a straightforward Hierarchy prefix:

Hierarchy (Reporting_id, Parent_Reporting_Id, [Node Name], [Parent Name], [Node Name], [Path], '/', [Depth])

LOAD Reporting_id,

     Parent_Reporting_Id,

     Percent,

     [Noad name] as [Node Name]

FROM Data_multiple_parent.xlsx (ooxml, embedded labels, table is Sheet1);

But be careful here: A hierarchy with multiple parents can explode in size. I your case, a node never has more than 4 parents, and it could make sense to display it as a hierarchy. But if the parent also has 4 parents - and the next parent also, then you have created 64 records of the single one you started with.

Also, a node will appear in several places in the tree:

Image4.png

HIC