Dynamic Subtotals in Dynamic Subsets
Posted: Tue Jul 26, 2011 9:31 pm
I'm working on budget model that will be used by each department to budget the number of people on their team by position. Operators are going to enter headcount on two forms--one for hourly individuals and one for salaried individuals. The forms need to be separate because salaried positions are fixed but the number of houry positions varies month to month depending on business volumes.
Each position has an attribute for PayType (S or H) depending on if the position is hourly or salaried. The parent (Department1) does not have an attribute for PayType.
Using info on the formums I was able to create a dynamic subset that contains all salaried positions and the total for Department1.
{Union({[h_position].[Department1]},{FILTER({Descendants({ [h_position].[Department1]})},[h_position].[PayType] = 'S')})}
The problem that is that the total includes Hourly positions as well and it should not. Is there a way to adjust the subtotal for Department1 so that it only looks at positions that have paytype of S?
Thanks in advance for the help!
Each position has an attribute for PayType (S or H) depending on if the position is hourly or salaried. The parent (Department1) does not have an attribute for PayType.
Using info on the formums I was able to create a dynamic subset that contains all salaried positions and the total for Department1.
{Union({[h_position].[Department1]},{FILTER({Descendants({ [h_position].[Department1]})},[h_position].[PayType] = 'S')})}
The problem that is that the total includes Hourly positions as well and it should not. Is there a way to adjust the subtotal for Department1 so that it only looks at positions that have paytype of S?
Thanks in advance for the help!