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

Hierarchy Load

I am trying to create a hierarchy load to create Tree View of an employee hierarchy but it is not working.  I have tried numerous order of load.  I have looked at a few examples and this seems to be the correct layout.  'EmployeeTree' is never displayed as a list box item.  I have tried making the other fields a 'Tree View' and this has not worked either.

ParentEmployeeBusinessEntityID and SalesRep_ID both are num fields.

Employee:

LOAD

    DepartmentName,

    num(EmployeeBusinessEntityID) AS SalesRep_ID,

    (LastName & ',' & FirstName & '.' & MiddleName) AS employee_fullName,

    EndDate AS EmployeeEndDate,

    FirstName AS EmployeeFirstName,

    LastName AS EmployeeLastName,

    MiddleName AS EmployeeMiddleName,

    ParentEmployeeBusinessEntityID,

    StartDate AS EmployeeStartDate,

    Title AS EmployeeTitle;

SQL SELECT *

/*Load hierarchy*/

EmployeeTreeView:

  Hierarchy (ParentEmployeeBusinessEntityID, SalesRep_ID, employee_fullName,, employee_fullName, EmployeeTree)

  LOAD

  ParentEmployeeBusinessEntityID,

  SalesRep_ID,

  employee_fullName

RESIDENT Employee;

DROP TABLE EmployeeTreeView;

Any suggestions?

Thanks.

0 Replies