Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 djnqlear
		
			djnqlear
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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 | 
 
					
				
		
 Or
		
			Or
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It looks like that's exactly what you're already doing..? What exactly is the problem and data structure?
 djnqlear
		
			djnqlear
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		i want the count of Employee aggregated at all levels to the top not only at the bottom child node where the Employment data is.
 
					
				
		
 Or
		
			Or
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		But all of the ones you highlighted appear to have zero employees associated with them..?
Displaying the total in each box is the default behavior, I've used this object before and have done that. However, as far as I know, you can't float information between levels so you can't make those four employees float to higher levels.
Are you looking something like this?
tab1:
Hierarchy(Emp, Mgr, NodeName, ParentName, NodeName, PathName, '/', Depth)
LOAD *, Emp As NodeName;
LOAD * INLINE [
    Emp, Mgr
    011J00003003, 
    011J000AE001, 011J00003003
    011J000AE002, 011J00003003
    011J000AE003, 011J00003003
    011J000AJ001, 011J00003003
    011J000DP001, 011J00003003
    011J000DP002, 011J000DP001
    011J000DP003, 011J000DP002
    011J001EJ002, 011J000DP002
    011J001EJ003, 011J001EJ002
];Output:
 djnqlear
		
			djnqlear
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		ORG:
GParent & '_' & child as %Key,
Child,
Parent,
StringPos
Emp:
SubField(StringPos,'.',1) & '_' & Child as %Key,
Employee
 djnqlear
		
			djnqlear
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		EMPLOYEE:
LOAD * INLINE [
%Key, Employee
011J00003003_011J001EJ003, 1365
011J00003003_011J001EJ003, 1366
011J00003003_011J001EJ003, 1367
011J00003003_011J001EJ003, 1368
011J00003003_011J001EJ004, 1369
011J00003003_011J001EJ004, 1370
011J00003003_011J001EJ004, 1371
011J00003003_011J001EJ004, 1372
011J00003003_011J001EJ004, 1373
011J00003003_011J001EJ005, 1374
011J00003003_011J001EJ005, 1375
];
ORG:
LOAD * INLINE [
%Key, GParent, Parent, Child, StringPos
011J00003003_011J001EJ003, 011J00003003, 011J001EJ002, 011J001EJ003, 011J00003003.011J000DP001.011J000DP002.011J001EJ002.011J001EJ003
011J00003003_011J001EJ002, 011J00003003, 011J000DP002, 011J001EJ002, 011J00003003.011J000DP001.011J000DP002.011J001EJ002
011J00003003_011J000DP002, 011J00003003, 011J000DP001, 011J000DP002, 011J00003003.011J000DP001.011J000DP002
011J00003003_011J000DP001, 011J00003003, 011J00003003, 011J000DP001, 011J00003003.011J000DP001
011J00003003_011J001EJ004, 011J00003003, 011J00DP003, 011J001EJ004, 011J00003003.011J000DP001.011J000DP002.011J00DP003.011J001EJ004
011J00003003_011J00DP003, 011J00003003, 011J000DP002, 011J00DP003, 011J00003003.011J000DP001.011J000DP002.011J00DP003
011J00003003_011J000DP002, 011J00003003, 011J000DP001, 011J000DP002, 011J00003003.011J000DP001.011J000DP002
011J00003003_011J000DP001, 011J00003003, 011J00003003, 011J000DP001, 011J00003003.011J000DP001
011J00003003_011J001EJ005, 011J00003003, 011J00DP003, 011J001EJ005, 011J00003003.011J000DP001.011J000DP002.011J00DP003.011J001EJ005
011J00003003_011J00DP003, 011J00003003, 011J000DP002, 011J00DP003, 011J00003003.011J000DP001.011J000DP002.011J00DP003
011J00003003_011J000DP002, 011J00003003, 011J000DP001, 011J000DP002, 011J00003003.011J000DP001.011J000DP002
011J00003003_011J000DP001, 011J00003003, 011J00003003, 011J000DP001, 011J00003003.011J000DP001
];
I get:
I want:
 Mordevolt
		
			Mordevolt
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		did you get the answer on this?
trying to solve same problem now, no luck yet(
 altunel0777
		
			altunel0777
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi everyone,
were you able to find a solution?
