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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed with Hierarchy

I have an excel file that contains all the employees in an organization (table name is USER).  Each row (person) has a quota value, let’s call it “Quarter Quota”.  However, within this table are the various levels of hierarchy (sales rep, sales mgr, sales director), so I cannot SUM this value, as it would include the totals for each “level” of hierarchy.  The unique ID of each user is Emp_Number…and the only variable to identify the level of hierarchy is Position_Description.

Ideally I need to create some sort of Hierarchy, where I define the levels which comprise the hierarchy, though the documentation I’ve read on this make it seem that the “levels” are found in distinct tables…not within the same table as I’ve described above.  Do I need to create multiple tables, isolating each level of the hierarchy, then do the QV hierarchy prefix function?  Is there a way to create a hierarchy from just this one USER table.

Thanks in advance for any help you can offer.

Dan

6 Replies
MarcoWedel

There is a hierarchy prefix for load statements you can use. Please post sample data. Regards Marco

hic
Former Employee
Former Employee

You should read Hierarchies to find out in what form your hierarchy is.

HIC

Not applicable
Author

This looks helpful.  Thanks, Henric.

MarcoWedel

could you please explain a bit more about how the dependencies of the different hierarchy levels can be retrieved from your sample data?

thanks

Marco

hic
Former Employee
Former Employee

It is probably possible to load your Excel sheet using a whole lot of script transformations, but I would suggest you clean up your source data instead.

  • There is a nice [P Number] that you can use as key. If so, you would need a column [Parent P Number] containing the P number for the immediate manager.
  • You have three levels of managers above the employees, e.g.: Indira Mustafa, Ben D'abo och Joe Smith. Instead of listing them in three columns for employee Ryan Brown, you should have them on their own rows - one row per person - with P Number, Parent P Number and everything.

When that is done, you could probably load your table directly using the Hierarchy prefix.

HIC