<!-- https://learnsql.cpetoday.com/functions/dax/openingbalancequarter -->
# OPENINGBALANCEQUARTER

Language: DAX
Category: Time intelligence: balances
Syntax: OPENINGBALANCEQUARTER(<expression>, <dates> [, <filter>])
Summary: Evaluates a balance at the start of the calendar quarter in the filter context.
Returns: A value (a scalar).
Level: Intermediate
Related: CLOSINGBALANCEQUARTER, OPENINGBALANCEMONTH, OPENINGBALANCEYEAR, CALCULATE, LASTNONBLANK

## What it does
OPENINGBALANCEQUARTER returns a balance as it stood at the start of the quarter. The opening balance for Q2 is the closing balance at the end of Q1. Finance teams use it for quarterly roll-forwards of deferred revenue, receivables, accruals and inventory, and for the quarter-start check in a board pack.

## Syntax and arguments
- expression: the measure or column that holds the balance. Required.
- dates: the date column of the Calendar table. Required.
- filter: an optional filter, such as a product line or a legal entity. Optional.

## Example
A subscription business tracks deferred revenue, which is cash received for service not yet delivered. The controller wants the balance at the start of each quarter for the quarterly roll-forward.

```dax
Deferred Revenue Opening Q =
OPENINGBALANCEQUARTER(SUM('Deferred_Revenue'[Balance]), 'Calendar'[Date])
```

In a row for Q2 2027, the measure returns the deferred revenue balance on the first day of April 2027, which is the closing balance of the first quarter.

## Example: a second, different use
The opening receivables balance for one business unit, filtered on the unit in the report.

```dax
AR Opening Q =
OPENINGBALANCEQUARTER(
    SUM('AR_Snapshot'[Balance]),
    'Calendar'[Date],
    'AR_Snapshot'[BusinessUnit] = "Services"
)
```

## Things to watch
- The built-in quarter is the calendar quarter. For a fiscal quarter, build a filter from the fiscal columns of the Calendar.
- A quarter opening balance needs a snapshot row for the first day of the quarter, or it will be blank.
- Check that the opening of one quarter matches the closing of the quarter before.
- Use the Calendar date column with a complete calendar.

## In business terms
OPENINGBALANCEQUARTER supports the quarterly roll-forward of deferred revenue, receivables and accruals, the start-of-quarter check in the close, and the audit trail that proves the balance carried forward from one quarter to the next.
