OPENINGBALANCEYEAR Function (DAX)

How does the OPENINGBALANCEYEAR function (DAX) work?

The OPENINGBALANCEYEAR function (DAX) evaluates the expression in the current context as at the first date of the year.

OPENINGBALANCEYEAR Formula Syntax

OPENINGBALANCEYEAR(
     <expression>,<dates>[,<filter>][,<year_end_date>]
)

How do you use the OPENINGBALANCEYEAR function?

A scalar value which represents the expression evaluated in the current context at the first date of the year.

Related Blog Posts

Related Support Forum Posts

DAX Formula to calculate Cumulative Totals with ClosingBalanceYear Measure
Understanding DAX Formula
Developing Complex Dax functions

Considerations when using the OPENINGBALANCEYEAR function

The dates argument can be any of the following:

  • A reference to a date/time column.
  • A table expression that returns a single column of date/time values.
  • A Boolean expression that defines a single-column table of date/time values.

The year_end_date parameter is a string literally of a date, at the same locale as the client’s locale where the workbook was created. The year portion of the date is ignored.

Does not allow this DAX function for use in DirectQuery mode.

Related Video Tutorials

Formula examples using the OPENINGBALANCEYEAR function

The following sample formula creates a measure that calculates the ‘Year Start Inventory Value’ of the product inventory.

= OPENINGBALANCEYEAR (
   SUMX(
     ProductInventory,ProductInventory
        UnitCost]*ProductInventory[UnitsBalance]),
         DateTime[DateKey]
)

Related DAX Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD

To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.