Acumatica Business Central Sage Intacct STACK Takeoff & Estimate Velixo Classic
Acumatica Business Central Sage Intacct STACK Takeoff & Estimate Velixo Classic

ACCOUNTTOTALDEBITS

Overview

The ACCOUNTTOTALDEBITS function calculates the total debits of one or more general ledger account(s) for a given period.

Syntax

=ACCOUNTTOTALDEBITS(
    ConnectionName, 
    Ledger, 
    AccountClass, 
    Account, 
    Subaccount, 
    Branch, 
    FromPeriodOrDate, 
    ToPeriodOrDate, 
    IncludeUnposted, 
    UseMasterFinancialCalendar,
    UseAccountCurrency
)

Arguments

The ACCOUNTTOTALDEBITS function uses the following arguments (see our articles on Filtering Velixo Functions and using arrays or cell ranges as arguments):

Argument

Required/Optional

Description

ConnectionName

Optional

Provide one of the following values:

OR

Omit the argument to return results for all compatible connections with default aggregation settings.

Ledger

Required

Ledger ID.

Leverage the ACU.EXPANDLEDGERRANGE function to obtain available values.

Supports Velixo filtering techniques.

AccountClass

Optional, though required if Account is empty

Account class ID.

Leverage the EXPANDACCOUNTCLASSRANGE function to obtain available values.

Supports Velixo filtering techniques.

Account

Optional, though required if AccountClass is empty

General ledger account code(s).

Leverage the EXPANDACCOUNTRANGE function to obtain available values.

Supports Velixo filtering techniques.

Subaccount

Optional

Subaccount code(s).

Leverage the EXPANDSUBACCOUNTRANGE function to obtain available values.

Supports Velixo filtering techniques.

Branch

Optional

Branch ID(s).

Leverage the EXPANDBRANCHRANGE function to obtain available values.

Supports Velixo filtering techniques.

FromPeriodOrDate

Required

The beginning financial period, in MM-YYYY format
or
a reference to a cell containing the beginning date in a valid Excel date format

ToPeriodOrDate

Required

The ending financial period, in MM-YYYY format.
or
a reference to a cell containing the ending date in a valid Excel date format

IncludeUnposted

Optional

1 - Include posted transactions only (default)

2 - Include Unposted transactions only

3 - Include Posted and Unposted transactions

  • Transactions with a status of "On Hold" are excluded. When Unposted transactions are included, the following statuses are included: Balanced, Unposted, and Pending Approval.

  • If a document is still in the AR module (e.g., Invoice), the corresponding GL batch has not yet been created, thus the balance for that document will not be reflected).

  • The Pending Approval status is sourced from the VelixoReportsPro-GLTranByPeriod generic inquiry and requires the Velixo customization package version 7.1.678.24873 (20250722) or later.

  • You can't include unposted transactions for the YTD Net Income account. If the accounts selected by your formula include it, the function returns an error stating that the balance can only be calculated for posted transactions. This applies whether you filter by financial period or by date.


Excel for Windows allows the use of quotation marks around this argument. Excel for Mac and Excel Online require that it be unquoted.

UseMasterFinancialCalendar

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).

Possible values:

  • TRUE

  • FALSE (default)

UseAccountCurrency

Optional

Set to TRUE to return amounts in the account's own currency.

Accepted values: TRUE, FALSE

Default value: FALSE

Examples

Based on this data:

sampledata.png


Example 1 - using Financial Period

=ACCOUNTTOTALDEBITS(
    "Demo", 
    "ACTUAL", 
    , 
    "10200",
    , 
    "PRODWHOLE",
    $F$1, 
    $F$1
)


Description: Calculates the total debits posted in general ledger account #10200 of the PRODWHOLE branch during the period of 01-2019.

Result: 4,548,435

debits_period.png


Example 2 - using cell references to dates

=ACCOUNTTOTALDEBITS(
    "Demo", 
    "ACTUAL",
    , 
    $B7, 
    , 
    , 
    $C$4, 
    $D$4
)


Description: Calculates the total debits posted in general ledger account #10600 (as noted in cell B7) between January 1, 2019 and January 15, 2019 (as noted in cells C4 and D4).

Result: 3,325

debits_date.png

Limitations to filtering by date instead of the financial period

  • Don't filter the YTD Net Income account by date. This is the account set as YTD Net Income Account in Acumatica's General Ledger preferences. For this account, Velixo ignores the dates and calculates the amount for the whole financial period that contains them, without an error. For example, total debits from March 1 to March 5 return the total debits for all of March. To calculate net income for a date range, use the workaround described in ACCOUNTTURNOVER.