ACCOUNTENDINGBALANCE
Overview
The ACCOUNTENDINGBALANCE function calculates the ending balance of one or more general ledger account(s) as of a specific period - some organizations refer to this as the PeriodEndingBalance or PeriodClosingBalance for an account.
Syntax
=ACCOUNTENDINGBALANCE(
ConnectionName,
Ledger,
AccountClass,
Account,
Subaccount,
Branch,
AsOf,
IncludeUnposted,
UseMasterFinancialCalendar
)
Arguments
The ACCOUNTENDINGBALANCE function uses the following arguments (see our article on Filtering Velixo Functions and using Excel arrays and cell ranges as arguments):
Argument | Required / Optional | Description |
| Optional | Provide one of the following values:
OR Omit the argument to return results for all compatible connections with default aggregation settings. |
| Required | Ledger ID. Leverage the ACU.EXPANDLEDGERRANGE function to obtain available values. Supports Velixo filtering techniques. |
| Optional, though required if | Account class ID. Leverage the EXPANDACCOUNTCLASSRANGE function to obtain available values. Supports Velixo filtering techniques. |
| Optional, though required if | General ledger account code(s). Leverage the EXPANDACCOUNTRANGE function to obtain available values. Supports Velixo filtering techniques. |
| Optional | Subaccount code(s). Leverage the EXPANDSUBACCOUNTRANGE function to obtain available values. Supports Velixo filtering techniques. |
| Optional | Branch ID(s). Leverage the EXPANDBRANCHRANGE function to obtain available values. Supports Velixo filtering techniques. |
| Required | The financial period, in MM-YYYY format |
| Optional | 1 - Include posted transactions only (default) 2 - Include Unposted transactions onl 3 - Include Posted and Unposted transactions
|
| Optional | Use Acumatica's Master Financial Calendar instead of the financial calendar defined within the specific tenant associated with the connection being accessed (this can be useful for consolidation reports).
|
Examples
Given this data:

Example 1
=ACCOUNTENDINGBALANCE(
"Demo",
"ACTUAL",
,
"10200",
,
,
"01-2019"
)
Description: Calculates the ending balance of posted transactions to General Ledger account #10200 (as noted in cell B6) for the 7th period of the year 2019 (as noted in cell G1).
Result: 45,042,790

Example 2
=ACCOUNTENDINGBALANCE(
"Demo",
"ACTUAL",
,
"10700",
,
,
$D$4,
3
)
Description: Calculates the ending balance of the combined posted and unposted (as noted by the last argument: 3) transactions to General Ledger account #10700 (as noted in cell B8) as of January 15, 2019 (as noted in cell D4).
Result: 4,421,510
