Setting Opening Balances of All Accounts
To set the opening balances of accounts, use the Exp
and IsFirst
functions in an If structure. Exp
and If structures are introduced in the previous sections; IsFirst
determines whether the current period is the first period in the default frequency of the current scenario. For example, if a scenario has a default frequency of Monthly, IsFirst
determines whether the current period is the first month in the year.
To set opening balances, place IsFirst
in an If structure’s If...Then
statement, then place Exp
between this statement and the End If statement. While you can include a specific account in Exp
’s argument, you probably will want to set the opening balances of all the accounts.
This example shows you how to set the opening balances of all accounts. You can just retype or copy this example into a Calculation rule without modifications:
HS.EXP "A#ALL = A#ALL.P#Prior"
Note:
In this example, A# is followed by the keyword ALL
; this means that the rule applies to all accounts. In addition, the P#
characters are followed by the keyword Prior
; this means that EXP
gets the account data from the period prior to the current period.