OpenBI Docs Buy

CLOSINGBALANCEQUARTER

The expression's value on the final date of the quarter the filter context is in.

Group: Time intelligence. Compatible with DAX.

Syntax

CLOSINGBALANCEQUARTER ( <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 quarter's last date that the column holds.

Remarks

  • The quarter is the one of the last date in the filter context; its last date is the last one the column has in it.
  • It is the same as CALCULATE ( expression, ENDOFQUARTER ( dates ) ), with the filter added when one is given.
  • When the expression is blank on that date, the result is BLANK; no earlier date is tried.
  • 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

Opening and closing price of a quarter

The third quarter of 2025 for malting barley: it opens on the close of 30 June and closes on 30 September.

EVALUATE
CALCULATETABLE (
    ROW (
        "Opening", OPENINGBALANCEQUARTER ( [Close price], Prices[Date] ),
        "Closing", CLOSINGBALANCEQUARTER ( [Close price], Prices[Date] )
    ),
    Prices[Commodity] = "Malting barley",
    DATESBETWEEN ( Prices[Date], DATE ( 2025, 7, 1 ), DATE ( 2025, 9, 30 ) )
)
OpeningClosing
4224.444700.38

OPENINGBALANCEQUARTER, CLOSINGBALANCEMONTH, CLOSINGBALANCEYEAR, ENDOFQUARTER.

Last updated · OpenBI Studio 0.3.74