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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Recuring Routine to Build Hierarchy Levels

I have a lookup table with two columns:  Resource and Manager

Resource     Manager

________     _______

Jones           Wilson

Smith           Wilson

Thomas        Andrews

Wilson          Thomas

Resource       Manager       Director       AVP

________       _______       _______      ____

Jones             Wilson         Thomas       Andrews

Smith             Wilson         Thomas       Andrews

I need to write a recursive routine to build out 5 level of management Hierarchy: Resource-Manager-Director-AVP-VP.

This is done by taking the original Resource and going back to the lookup table, assigning the Manager as the Resource - and taking the returned Manager value and making it the Director. - etc. etc...

Any Help?

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

The Hierarchy prefix does exactly this.

Hierarchy (ResourceID, ManagerID, Resource)

Load

          Resource as ResourceID,

          Resource,

          Manager as ManagerID

          From ...

HIC

View solution in original post

1 Reply
hic
Former Employee
Former Employee

The Hierarchy prefix does exactly this.

Hierarchy (ResourceID, ManagerID, Resource)

Load

          Resource as ResourceID,

          Resource,

          Manager as ManagerID

          From ...

HIC