Daily DAX : Day 459 OPENINGBALANCEWEEK

OPENINGBALANCEWEEK – DAX Function

Purpose: Returns the value of an expression calculated at the end of the previous week (i.e. the opening balance position carried into the current week).

Syntax (2025+ calendar-based version)

OPENINGBALANCEWEEK(
    <expression>,
    <calendar>
    [,<filter>]
)

Parameters

  • expression → usually a measure like SUM(Sales[Amount]) or SUMX(Inventory, [Value])
  • calendar → reference to your calendar table (must have date column marked as Date table)
  • filter (optional) → additional filter context (rarely used)

What it really returns

The value your measure had on the last day of the previous week.
→ Monday's opening balance = Sunday's closing balance (of the prior week)

Typical Use Cases

  1. Opening inventory / stock value at the start of each week
  2. Opening cash / bank balance before weekly transactions
  3. Carried-forward arrears / backlog at week start
  4. Week-to-date change calculation:
    Weekly Increase = [Current Balance] - [Opening Balance Week]
  5. Comparing week-start position vs. week-end position in finance & operations

Practical Example – Opening Inventory Value

Opening Inventory Value = 
OPENINGBALANCEWEEK(
    SUMX( ProductInventory, ProductInventory[UnitCost] * ProductInventory[UnitsBalance] ),
    'Calendar'[Date]
)

This measure shows the inventory value that was already in the warehouse when the current week began.

Quick Comparison – Related Week Functions (2025+)

Function Returns value from...
OPENINGBALANCEWEEKEnd of previous week (week start position)
CLOSINGBALANCEWEEKEnd of current week
TOTALWTDWeek-to-date total (from week start to current date)

Note: Requires a proper Date table and calendar-based time intelligence (available since late 2025 in Power BI).
Older style without calendar parameter is mostly replaced.

Comments

Popular posts from this blog

Daily DAX : Day 131 SELECTEDMEASURE

Daily DAX : Day 446 INFO.CSDLMETADATA

Daily DAX : Day 453 ENDOFWEEK