Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a Hierarchy based on a single column of data

Hi All,

I have a single column of reporting manager names (with other associated information).

What I need to be able to do is create a structure which creates a hierarchy within the managment column. The column contains the name of the manager that each resource reports into.

E.g.

Reports into

Mr. Top

Mr. Top

Mr. OneLevelDown

Mrs. One LevelDown

Mr. OneLevelDown

etc.

Based on this data I believe I need something that looks like this which will enable me to select a Manager name and see the staff that report into them:

Level      | Name

1                 Mr. Top

2                 Mr. OneLevelDown

2                 Mrs. OneLevelDown

Is this possible? If so how do I do this?

Is there a better solution?

This needs to be dynamic as the list will change on a monthly basis.

Many thanks,

P

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

If you have one record per person and two columns: ID and ManagerID, then you can use the Hierarchy prefix.

HIC

View solution in original post

3 Replies
hic
Former Employee
Former Employee

If you have one record per person and two columns: ID and ManagerID, then you can use the Hierarchy prefix.

HIC

Not applicable
Author

Thanks Henric.

I do have one record per person, so this sounds like the way to approach the problem.

I will have a dig around the community for a sample file / tutorial info.

Thanks again!

hic
Former Employee
Former Employee

There is some info in the QlikView help. You can also load the attached file with

Hierarchy (NodeID,ParentID,District,ParentDistrict,District,Path,'/',Depth)

LOAD NodeID,

          NodeName as District,

          ParentID

FROM Winedistricts.xls (biff, embedded labels, table is Sheet1$);

and see how it works.

Good luck!

HIC