Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Tags (2)
1 Solution

Accepted Solutions
Employee
Employee

Re: Creating a Hierarchy based on a single column of data

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

HIC

3 Replies
Employee
Employee

Re: Creating a Hierarchy based on a single column of data

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

HIC

Not applicable

Re: Creating a Hierarchy based on a single column of data

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!

Employee
Employee

Re: Creating a Hierarchy based on a single column of data

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

Community Browser