DAX Function Guide

OPENINGBALANCEMONTH
Empty image or helper icon

Sam McKay

CEO & Founder

How does the OPENINGBALANCEMONTH work?
The OPENINGBALANCEMONTH function (DAX) evaluates the expression at the first date of the month in the current context.
OPENINGBALANCEMONTH Formula Syntax

OPENINGBALANCEMONTH(
     <expression>,<dates>[,<filter>]
)

How do you use the OPENINGBALANCEMONTH?

The dates parameter 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.

Constraints on Boolean expressions −

  • The expression cannot reference a calculated field.
  • The expression cannot use CALCULATE function.
  • The expression cannot use any function that scans a table or returns a table, including aggregation functions.

However, a Boolean expression can use any function that looks up a single value, or that calculates a scalar value.

The filter parameter can be a Boolean expression or a table expression that defines a filter.

Related Blog Posts

Loading

Considerations when using the OPENINGBALANCEMONTH?

If the data is filtered, the function changes the context in which the data is filtered, and the expression is evaluated in the new context you define. All current filters on that column are removed for each column used in a filter parameter and instead the filter used in the filter parameter is applied.

Related Video Tutorials

Loading

Formula examples using the OPENINGBALANCEMONTH

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

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

Related Courses

Loading