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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Hierarchical data issue

Hi everyone,

Have an issue that I can't figure out.  In the attached spreadsheet is a list of names of employees for a company.  It lists each employee, the employee's manager, the manager of the employee's manager, and so on, up to the title of President of the company.  What I want to do is count the number of employees whose title is 'Worker' for each Vice President.  Based on the hierarchy, the Vice President could be in the Mgr, Mgr+1, or Mgr+2 columns of the file.

In the example provided, Karen Wilson should have a total of 3 workers, and Paula Jones should have a total of 4.  I can split this info up into different straight tables based on the Mgr, Mgr+1, or Mgr+2 fields, but I want to have a single table that shows Karen Wilson and her count of 3, and Paula Jones and her count of 4.  Any ideas?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

When LOADing the spreadsheet, add a column called VicePresident to every row. It will contain a name if anyone of the three Manager columns contains a VicePresident (3 nested IFs will be sufficient)

Then create a Straight Table with field Vice President as single dimension, and the following expression:

=count({<Title = {"Worker"}>} DISTINCT Employee)

Anonymous
Not applicable
Author

Hola,

PFA.

HTH