What's the feeder for this rule
Posted: Tue Jan 04, 2011 11:12 am
Code: Select all
['Grand Total', 'All Months'] = DB ('Headcount', !Year, !Version, !Function, !Status, !Category, !Department, !Position, !Base Location, 'December', !Grade, !Cost Center, 'Total Headcount');
['Average Headcount', 'All Months'] = (
DB ('Headcount', !Year, !Version, !Function, !Status, !Category, !Department, !Position, !Base Location, 'Quarter 1', !Grade, !Cost Center, 'Total Headcount') +
DB ('Headcount', !Year, !Version, !Function, !Status, !Category, !Department, !Position, !Base Location, 'Quarter 2', !Grade, !Cost Center, 'Total Headcount') +
DB ('Headcount', !Year, !Version, !Function, !Status, !Category, !Department, !Position, !Base Location, 'Quarter 3', !Grade, !Cost Center, 'Total Headcount') +
DB ('Headcount', !Year, !Version, !Function, !Status, !Category, !Department, !Position, !Base Location, 'Quarter 4', !Grade, !Cost Center, 'Total Headcount'))
)
\
IF (!Version @= 'Base',
2,
4);
The Total Headcount will display the total headcount at the end of each month, if the Month element type is numeric, and will display the total headcount of it's last child if the Month element type is consolidation. So, the Total Headcount for Quarter 1 is the same as the total headcount of March, and the Grand Total for All Months equal Total Headcount December and equal Total Headcount Quarter 4.
So, Grand Total is only used for All Months, while Total Headcount is used for all Month elements. I know that Grand Total is kind of useless in the first glance, but I need it.
The Average Headcount only calculated for element All Months and the value is calculated from the value of each quarter, not from each month. The divisor is 4, but for Base Version the divisor is two because Quarter 3 and 4 in Base Version contain no values.
The problem is, when Suppress Zero is activated, the Grand Total and Average Headcount are suppressed as well.
Here is my feeder. Can someone please check it?
Code: Select all
['Total Headcount','Quarter 1'] => ['Average Headcount','All Months'];
['Total Headcount','Quarter 2'] => ['Average Headcount','All Months'];
['Total Headcount','Quarter 3'] => ['Average Headcount','All Months'];
['Total Headcount','Quarter 4'] => ['Average Headcount','All Months'];
['Total Headcount', 'December'] => ['Grand Total','All Months'];