OPENINGBALANCEYEAR DAX Function in Power BI
The OPENINGBALANCEYEAR DAX Function evaluates the expression at the first date of the year in the current context.
DAX Syntax OPENINGBALANCEYEAR(expression, dates[, filter][, year_end_date])
The function has the following parameters:
- expression: An expression that returns a scalar value.
- dates: A column that contains dates.
- filter: It is an optional parameter. An expression that specifies a filter to apply to the current context.
- year_end_date: It is an optional parameter. A literal string with a date that defines the year-end date. The default is December 31.
Example: Let's create a measure with name "OPENINGBALANCEYEAR Measure".
DAX
OPENINGBALANCEYEAR Measure = OPENINGBALANCEYEAR(SUM('Students List'[10th Marks]),'Students List'[Dates])
The output of the measure is shown below:
