OpenBI Docs Buy

OPENINGBALANCEQUARTER

Reads a value as the quarter opens: on the column's final date before the quarter begins.

Group: Time intelligence. Compatible with DAX.

Syntax

OPENINGBALANCEQUARTER ( <expression>, <dates> [, <filter>] )
ParameterTypeDescription
expressionExpressionThe value wanted on that one date, usually a measure of a level such as a price, a stock or a balance.
datesDatesA column of dates of the model, such as Sales[Month], or the name of a calendar defined in the model.
filterFilter
optional
A condition or a table that filters as well, as a filter argument of CALCULATE does.

Returns

Same type as the expression. The expression on the last date the column holds before the quarter.

Remarks

  • The quarter is the one of the first date in the filter context; the opening is the closing of the quarter before: CALCULATE ( expression, ENDOFQUARTER ( PREVIOUSQUARTER ( dates ) ) ).
  • A filter on another column of the dates' table (a quarter or a month column) stays and can leave that date out: the result is then blank.
  • When the expression is blank on that date, the result is BLANK.
  • Given a calendar instead of a column, it works on the calendar's own periods (fiscal years, retail months of four or five weeks, ISO weeks). A filter on a category the calendar does not define, such as a month on a calendar of weeks, can make the call an error.

Examples

A quarter's opening and closing price

The third quarter of 2025 for malting barley.

EVALUATE
CALCULATETABLE (
    ROW (
        "Opening", OPENINGBALANCEQUARTER ( [Close price], Prices[Date] ),
        "Closing", CLOSINGBALANCEQUARTER ( [Close price], Prices[Date] ),
        "Close of 30 June", CALCULATE ( [Close price], Prices[Date] = DATE ( 2025, 6, 30 ) )
    ),
    Prices[Commodity] = "Malting barley",
    DATESBETWEEN ( Prices[Date], DATE ( 2025, 7, 1 ), DATE ( 2025, 9, 30 ) )
)
OpeningClosingClose of 30 June
4224.444700.384224.44

CLOSINGBALANCEQUARTER, OPENINGBALANCEMONTH, OPENINGBALANCEYEAR, PREVIOUSQUARTER.

Last updated · OpenBI Studio 0.3.74