Hello,
I have sales revenue data that I want to roll up to the next level manager from all his reports. The achievement of a manager is the sum of the achievements of his direct reports.
I have a 5 level employee hierarchy with level 0 being the field sales people and levels 1 to 5 are the successive levels of management. In my table (attached) I have four columns: EmployeeName, EmployeeLevel, ManagerName, SalesRevenue. For level 0 employees the SalesRevenue column has their actual sales achievements. All all other levels (1-5) I need to compute the total achievement of this manager's direct reports and this will become the manager's achievement. Recursively I will need to do this for all levels. Column D is what I need to fill and the answer should be as in column E
In the example data I am assuming each manager has two reports. Using Access queries I am creating 5 temporary tables to store rollup of each and then have 5 update queries to update the SalesRevenue column. I am wondering if I can automate this task without having to use multiple temp tables and update queries and make it more general for a specified hierarchy level.
I will appreciate if someone can suggest a cleaner solution using queries or perhaps using VBA recursive procedure, etc.
Regards
SalesOP
The same coTeh same in teh same
I have sales revenue data that I want to roll up to the next level manager from all his reports. The achievement of a manager is the sum of the achievements of his direct reports.
I have a 5 level employee hierarchy with level 0 being the field sales people and levels 1 to 5 are the successive levels of management. In my table (attached) I have four columns: EmployeeName, EmployeeLevel, ManagerName, SalesRevenue. For level 0 employees the SalesRevenue column has their actual sales achievements. All all other levels (1-5) I need to compute the total achievement of this manager's direct reports and this will become the manager's achievement. Recursively I will need to do this for all levels. Column D is what I need to fill and the answer should be as in column E
In the example data I am assuming each manager has two reports. Using Access queries I am creating 5 temporary tables to store rollup of each and then have 5 update queries to update the SalesRevenue column. I am wondering if I can automate this task without having to use multiple temp tables and update queries and make it more general for a specified hierarchy level.
I will appreciate if someone can suggest a cleaner solution using queries or perhaps using VBA recursive procedure, etc.
Regards
SalesOP
The same coTeh same in teh same