Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can i aggregate employees in org chart, the employee is located at child node.
Parent | Child | StringPos | Count(Employee) |
011J001EJ002 | 011J001EJ003 | 011J00003003.011J000DP001.011J000DP002.011J001EJ002.011J001EJ003 | 4 |
++up
Hello Everyone,
has someone found a solution for this request, I am trying to do the same thing.
thanks!
Iulia
I was looking for the same answer when I came across this post. It's old, but thought I would share my solution using the HierarchyBelongsTo function.
I created an Org Chart in Qlik Cloud and wanted to show on the card the number of Total Reports under each person. In the load script, I have my employees table which includes the EmployeeID and ManagerID.
I then used that resident table to create a table that provides the TotalReports value:
OrgData:
HierarchyBelongsTo(EmployeeID ,ManagerID,[Full Name],MgrID,MgrName,Depth)
LOAD EmployeeID ,ManagerID, [Full Name]
Resident AllEmployeesData
WHERE Status='Active';
OrgCount:
LOAD MgrID as EmployeeID
,Count(EmployeeID )-1 as TotalReports
Resident OrgData
Group By MgrID;
Drop Table OrgData;
Then in the Org Chart Measures value, I simply used TotalReports.
Hope this helps!