Skip to main content

XAVI Formula Reference

Complete reference for all XAVI formulas — BALANCE, BALANCECURRENCY, BUDGET, NAME, TYPE, PARENT, RETAINEDEARNINGS, NETINCOME, CTA, and TYPEBALANCE.

How to Provide Feedback

⚠️ Important: This is a pre-release MVP version made available to a limited number of early access testers. If you have found a new issue not listed in our Known Issues or just want to provide general feedback kindly use this link to provide feedback.

XAVI Formula Reference

This article covers every formula available in Financial Reporting. All formulas begin with the XAVI. prefix and pull live data from your connected NetSuite account.


Important Note About Dates

Dates are passed as parameters to XAVI formulas. This section explains how date and period values in Excel are interpreted by the add-in and sent to the backend as accounting periods.

TLDR; CloudExtend parses your dates and passes them as actual period names to NetSuite. If you're passing a date as a parameter to a XAVI formula enter it as 1/1/2025 in your Excel cell and format it in the way you prefer to present it (ie MM-YYYY). If you're manually adding a date to a XAVI formula enter as (XAVI.BALANCE("Jan 2025"...). If your periods do not align with months, then pass the period name in with quotes (see bullet point 4 below).

How dates relate to periods

When you enter a date for a period parameter, the add-in does not treat that date as “transactions on that single day” by default. Instead, it determines which calendar month and year that date falls in, converts that to an accounting period and sends that period to the server. The server then uses NetSuite’s period definition*(including the period’s real start and end dates) when it runs the request.

What you can type or put in a cell

You can use any of the following (including as a cell value or as a cell reference to a value):

  1. Excel calendar dates
    Examples: 1/1/2025, 01/15/2025, 31/1/2025 (depending on your Excel locale), or any formula that evaluates to a real Excel date (a date serial number under the hood).

  2. Month + year as text (recommended when using text)
    Examples: Jan 2025, JAN 2025 (letter case is normalized).

  3. Full month names also work when formatted as two words: January 2025.

  4. Period ID or Period Name (useful if your periods do not align with calendar months). You can get a list of your periods using the "Bulk Add GL and Periods" within the app. Period Name would be the most useful. Note if your periods do not align with months (ie Jan 1 - Jan 31) then the quick start reports (CFO Flash and Income Statement) may not function properly until you replace the dates with your period names.

  5. If you use adjustment periods, pass the internalID of the adjustment period in quotes as well. For example, if your adjustment period ID is 313 and you need to calcuate the balance for account 4100 use =XAVI.BALANCE("4100","313", "313").

  6. Year only (four digits)
    Examples: 2025 as text, or 2025 as a number.

    1. Important behavior: For a from period, a year alone is interpreted as Jan year; for a to period, a year alone is interpreted as Dec year. That makes a year-only value a convenient shorthand for a full calendar-year range when you use it as both endpoints.

Tip: The most reliable approach is to use a true Excel date (date serial) or a clearly unambiguous Month YYYY text string. If you rely on plain text, use a space between month and year (for example Jan 2025) rather than punctuation-only variants, unless you have confirmed they parse correctly in your environment.

NetSuite alignment: The period label sent to the server (for example May 2025) must match how periods are named in your NetSuite accounting calendar. If your NetSuite period names differ from a simple English month and year, use the names NetSuite expects (or the supported period identifiers your organization uses with the add-in).

Updating a whole sheet at once: one “year” cell

You can drive many formulas from a single year input cell so you do not have to edit every formula manually.


Pattern A — year only: Point from and to period arguments at the same cell that contains 2025. Because of the year-only rules above, that typically behaves like Jan 2025 through Dec 2025 when used as from/to respectively.

Pattern B — explicit months (more control): Keep a year in a cell (for example $B$1), and build dates with Excel functions, for example:

  • =DATE($B$1, 1, 1) for January

  • =DATE($B$1, 3, 1) for March

Any day within the month is fine for resolving the month; many users use the first day of the month for clarity.

When you change $B$1, Excel recalculates dependent formulas, and the add-in receives the updated values on the next calculation.


Display formats: "January", "Jan-2025", and other looks

Values like January, Jan-2025, mmm-yyyy, or mmmm yyyy are usually Excel number formats applied to a real date. Changing Format Cells only changes how the date looks; Excel still stores a date serial number underneath.

Because the add-in reads the cell's actual value (the serial) when Excel supplies it that way, you can make the sheet look any way you want — full month name, abbreviated month, month-year with a hyphen, and so on — without changing which period the add-in resolves, as long as the underlying stored value remains the correct date.

If a cell contains text that only looks like a date (not a true Excel date), the add-in may parse that text if it is in a supported form (for example Jan 2025 or January 2025). For the most predictable behavior, prefer real Excel dates plus formatting for appearance.


XAVI.BALANCE

The most used formula, XAVI.BALANCE, returns the GL account balance for a specific period or date range. This is the core formula for building financial reports.

Syntax

For Income, COGS, Expense Accounts
=XAVI.BALANCE(account, fromPeriod, toPeriod, [subsidiary], [department], [location], [class], [accountingBook])
For Balance Sheet Accounts
=XAVI.BALANCE(account,, toPeriod, [subsidiary], [department], [location], [class], [accountingBook])

⚠️ Important Note About Balance Sheet Accounts

The From Period should always be skipped (replace it with a comma) since Balance Sheet Accounts sum from the beginning of time.

Parameters

Parameter

Required

Description

Example

account

Yes

Account number or wildcard pattern

"4010" or "4*"

fromPeriod

Yes

Start period

"Jan 2025"

toPeriod

Yes

End period

"Dec 2025"

subsidiary

No

Subsidiary name or ID

"Celigo Inc."

department

No

Department name or ID

"Sales"

location

No

Location name or ID

"US"

class

No

Class name or ID

"Enterprise"

accountingBook

No

Accounting book ID

"1"

Examples

Single month
=XAVI.BALANCE("4010", "Jan 2025", "Jan 2025")
Full year
=XAVI.BALANCE("4010", "Jan 2025", "Dec 2025")
All revenue accounts (wildcard)
=XAVI.BALANCE("4*", "Jan 2025", "Dec 2025")
Q1 2025 for a specific subsidiary
=XAVI.BALANCE("4010", "Jan 2025", "Mar 2025", "Celigo Inc.")
Dynamic with cell references
=XAVI.BALANCE(A2, B$1, B$1, $P$3, $Q$3, $R$3, $S$3)
Balance Sheet Account for balance at the end of January 2025.
=XAVI.BALANCE("10010",,"Jan 2025")


XAVI.BALANCECURRENCY

Returns the GL account balance with explicit currency control. Use this for multi-currency consolidation scenarios where you need to specify the target currency.

Syntax

=XAVI.BALANCECURRENCY(account, fromPeriod, toPeriod, subsidiary, currency, [department], [location], [class], [accountingBook])

Parameters

Parameter

Required

Description

Example

account

Yes

Account number or wildcard pattern

"60010"

fromPeriod

Yes

Start period

"Jan 2025"

toPeriod

Yes

End period

"Dec 2025"

subsidiary

No

Subsidiary name or ID

"Celigo India Pvt Ltd"

currency

No

Currency code for consolidation

"USD", "EUR", "GBP"

department

No

Department name or ID

"Sales"

location

No

Location name or ID

"US"

class

No

Class name or ID

"Enterprise"

accountingBook

No

Accounting book ID

"1"

Important: Note that currency is in position 5, between subsidiary and department. This differs from XAVI.BALANCE.

Examples

India subsidiary balance reported in USD 
=XAVI.BALANCECURRENCY("60010", "Jan 2025", "Jan 2025", "Celigo India Pvt Ltd", "USD")
All subsidiaries, reported in EUR
=XAVI.BALANCECURRENCY("60010", "Jan 2025", "Mar 2025", "", "EUR")
Dynamic formula with cell references
=XAVI.BALANCECURRENCY($A5, C$4, C$4, $M$2, $O$2)

⚠️ Not all currency/subsidiary combinations are valid. The currency must be a valid consolidation root for the filtered subsidiary. Invalid combinations return INV_SUB_CUR (balance = 0).

TIP - The best way to see which currencies are availabel for a subsidiary is use the task pane, selected a Subsidiary Context, and then select currency to see which currencies are available for the BalanceCurrency formula.

BALANCECURRENCY applies NetSuite's consolidation logic at the presentation layer. It does not override transaction posting logic or introduce alternate FX assumptions.


XAVI.BUDGET

Returns the budget amount for an account and period. Supports wildcards and all the same dimensional filters as XAVI.BALANCE.

Syntax

=XAVI.BUDGET(account, fromPeriod, toPeriod, [subsidiary], [department], [location], [class], [accountingBook], [budgetCategory])

Examples

Annual budget for account 5000 
=XAVI.BUDGET("5000", "Jan 2025", "Dec 2025")
Sum of all expense budgets
=XAVI.BUDGET("6*", "Jan 2025", "Dec 2025")
Q1 budget for Sales department
=XAVI.BUDGET("5000", "Jan 2025", "Mar 2025", "Celigo Inc.", "Sales")//
Budget vs. Actual comparison
=XAVI.BALANCE("6*", "Jan 2025", "Jan 2025") - XAVI.BUDGET("6*", "Jan 2025", "Jan 2025")

XAVI.NAME

Returns the account name for a given account number. Useful for building dynamic report labels.

Syntax

=XAVI.NAME(account)

Example

=XAVI.NAME("4010")     → "Product Revenue"


XAVI.TYPE

Returns the account type (Income, Expense, Bank, etc.) for a given account number.

Syntax

=XAVI.TYPE(account)

Examples

=XAVI.TYPE("4010")     → "Income"
=XAVI.TYPE("1000")     → "Bank"


XAVI.PARENT

Returns the parent account number for a sub-account. Useful for navigating account hierarchies.

Syntax

=XAVI.PARENT(account)

Example

=XAVI.PARENT("4010-1")  → "4010"


Special Formulas

These formulas calculate values that NetSuite computes dynamically — they are not stored as standard account balances.

Formula

Purpose

Example

XAVI.RETAINEDEARNINGS

Cumulative P&L through prior year-end

=XAVI.RETAINEDEARNINGS("Dec 2024")

XAVI.NETINCOME

Net Income for a period range

=XAVI.NETINCOME("Jan 2025", "Mar 2025")

XAVI.CTA

Cumulative Translation Adjustment

=XAVI.CTA("Dec 2024")

⚠️ Important note on XAVI.NETINCOME: This formula always computes a period range. If you supply only one period, XAVI treats it as a single-period range (from = to), returning only that month's P&L — which will typically not match Balance Sheet Net Income. To match year-to-date Net Income, always pass both periods explicitly:

=XAVI.NETINCOME("Jan 2025", "Feb 2025")


XAVI.TYPEBALANCE

Returns the total balance for all accounts of a specific account type or special account type. This formula is used by the CFO Flash Report and is ideal when you want to summarize by financial category rather than by account number.

For full documentation on XAVI.TYPEBALANCE, including account type values, special account type values, and examples, see the dedicated XAVI.TYPEBALANCE Reference article.


Error Codes

Error

Formula

Meaning

INVALIDACCT

XAVI.BALANCE

Account is not the expected type for this formula

NOTFOUND

XAVI.BALANCE

Account number doesn't exist in NetSuite

TIMEOUT

Any

NetSuite query timed out

INV_SUB_CUR

XAVI.BALANCECURRENCY

Invalid currency/subsidiary combination


Related Articles

  • 📖 Using Wildcards for Summary Reports

  • 📖 Filtering by Subsidiary, Department, Class & Location

  • 📖 Troubleshooting & FAQ

Did this answer your question?