OpenBI Docs Buy

CLOSINGBALANCEWEEK

Reads a value on the closing day of the calendar's week, such as a stock or a price as the week ends.

Part of the calendar-based time intelligence that Power BI added in 2025.

Group: Time intelligence. Compatible with DAX.

Syntax

CLOSINGBALANCEWEEK ( <expression>, <calendar> [, <filter>] )
ParameterTypeDescription
expressionExpressionThe value wanted on that one date, usually a measure of a level such as a price, a stock or a balance.
calendarCalendarThe name of a calendar defined in the model that has a week category.
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 as it stands when the calendar's week closes.

Remarks

  • It takes a calendar only: a column of dates is an error. A calendar is defined in the model on a date table and tags its columns as year, quarter, month, week, date and the like; the week is whatever the calendar's week column says, ISO weeks from Monday or a retail week.
  • The week is the one of the last date in the filter context; the result is the expression on that week's last date. With ISO weeks and a Wednesday, 13 March 2024, in the filter, it reads Sunday 17 March.
  • When the expression is blank on that date, the result is BLANK.
  • The calendar must be able to read the filter context: one of weeks and dates without months cannot answer under a filter on a month, and the call is an error.

Examples

Without a calendar

The Example Brewery defines no calendar, so a date column is all it can offer, and the call fails.

EVALUATE
ROW ( "Closing", CLOSINGBALANCEWEEK ( [Close price], Prices[Date] ) )

Result: an error.

OPENINGBALANCEWEEK, CLOSINGBALANCEMONTH, ENDOFWEEK, TOTALWTD.

Last updated · OpenBI Studio 0.3.74