teddy0bear
New Member
- Joined
- Aug 26, 2016
- Messages
- 4
I'm trying to build a pivot table that will allow the user to select one department and it will show all say 3 data fields for that department. In some cases, however, the department they select will have sub departments. There is data at both the department level and the sub department level which is making things difficult. I have a department table that has a relationship already set up (*) with the data table.
My first issue is, if I do the filter on the department level (from the Dpt table) it wont show the sub departments in the filter. If I apply the filter to the Sub department level (Dpt table) it wont sum up the departments correctly. I'm not sure how to handle this?
To make my life more difficult, when the user selects ones of the parent departments, the pivot table needs to show the sum of 2 of the fields but not the last one. I think I have to tell it to ignore the relationship so it wont do that? I haven't figured that part out yet...
Dpt Table
*Sub Department / Department
Red / Red
Pink / Red
Magenta / Red
Blue / Blue
Turquoise / Blue
Data Table
*Department / Value1 / Value2 / Value3
Red / 1 / 4 / 2
Pink / 2 / 4 / 3
Magenta / 2 / 4 / 0
For example, if I were to say Pink I should get
2 / 4 / 3
If I were to say Red, I'm trying to get:
5 / 12 / 2
My first issue is, if I do the filter on the department level (from the Dpt table) it wont show the sub departments in the filter. If I apply the filter to the Sub department level (Dpt table) it wont sum up the departments correctly. I'm not sure how to handle this?
To make my life more difficult, when the user selects ones of the parent departments, the pivot table needs to show the sum of 2 of the fields but not the last one. I think I have to tell it to ignore the relationship so it wont do that? I haven't figured that part out yet...
Dpt Table
*Sub Department / Department
Red / Red
Pink / Red
Magenta / Red
Blue / Blue
Turquoise / Blue
Data Table
*Department / Value1 / Value2 / Value3
Red / 1 / 4 / 2
Pink / 2 / 4 / 3
Magenta / 2 / 4 / 0
For example, if I were to say Pink I should get
2 / 4 / 3
If I were to say Red, I'm trying to get:
5 / 12 / 2