You may noticed that new models include two default rules at the start which calculate the half year and full year totals.
Let’s have a look at the Total Year rule.
if( Variable^type == 2 || Mode == 1, DEC , JAN + FEB + MAR + APR + MAY + JUN + JUL + AUG + SEP + OCT + NOV + DEC )
This rule calculates the Year Total column as can be seen by the part that is adding JAN +FEB + MAR etc. However, this is a conditional rule with two possible outcomes. If we think about how the Year Total should be calculated for different variable types, we would expect Transaction type accounts to be summed, but Balanced type accounts to reflect the closing value as at the last month.
Also, if we think about the rule again from the point of view of Periodic Value versus Year To Date, we would only expect to sum the monthly periodic values. We would not want to sum each month’s YTD values. It is these two conditions that the rule is checking for before deciding which result to give. It can be translated as:
If the variable type is Balanced OR
if the mode is YTD,
then return December’s value (i.e. closing Balanced value or YTD Transactional value)
Otherwise return JAN + FEB + MAR + APR etc.
The rule for the First Half Year is very similar, except that it only sums up to June.
Post your comment on this topic.