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: 
vanderson009
Creator III
Creator III

Hierarchy in QlikView

Hi guys,

I want to create employee hierarchy and i have data like

                                                       

EmployeeIdTeamLeadIdManagerIdEmployeeName
AA0001 Employee1
AA0002 AA0001Employee2
AA0003 AA0001Employee3
AA0004AA0002AA0001Employee4
AA0005AA0002AA0001Employee5
AA0006AA0003AA0001Employee6

Want to implement ManagerId->TeamleadId-EmployeeId level hierarchy.

Could any one please let me know what script logic i need to use

Thanks in advance.

-Regards,

Villyee

4 Replies
Anonymous
Not applicable

senpradip007
Specialist III
Specialist III

PFA. Hope it will help.

Anonymous
Not applicable

Hi Villyee,

You will have to create data like below.

leaf nodeParent
AA0001
AA0002AA0001
AA0003AA0001
AA0004AA0002
AA0005AA0002
AA0006AA0003

Then use below code.

Hier:

HIERARCHY(leaf Node, PARENT node, leaf description)

LOAD leaf Node,

PARENT node,

leaf description

  FROM source file);

Then u can use ur leaf description field in the list box to show hierarchy.

Go through Hierarchy fuction in the reference manual.

Thanks,

NIshant

maleksafa
Specialist
Specialist

look for hierarchy load, you can find plenty of posts on the community.