CLOSINGBALANCEYEAR Function (DAX)

How does the CLOSINGBALANCEYEAR function (DAX) work?

The CLOSINGBALANCEYEAR function (DAX) evaluates the expression at the last date of the year using the current context. Its parameters include an expression with a scalar value, a column that contains dates, a filter that applies to the current context, and a literal string with a date that defines the year end.

CLOSINGBALANCEYEAR Formula Syntax

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

How do you use the CLOSINGBALANCEYEAR function?

This function is frequently used in inventory and balance calculations, where you want to calculate the closing balances year wise.

Related Blog Posts

Related Support Forum Posts

DAX Formula to calculate Cumulative Totals with ClosingBalanceYear Measure
Cumulative Banking Transactions – ALL vs ALLSELECTED within cumulative totals
DAX Balance Sheet Include Closing Balance

Considerations when using the CLOSINGBALANCEYEAR function

The dates parameter can be a reference to a date/time column, a table expression that returns a single column of date/time values, or a Boolean expression that defines a single-column table of date/time values.

Related Video Tutorials

Formula examples using the CLOSINGBALANCEYEAR function

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

=CLOSINGBALANCEYEAR(Sum(Sales[Quantity]), Sales[OrderDate])

=CLOSINGBALANCEYEAR( COUNT (CRASH_DATA_T[CASE_NUMBER]), Calc_Date_T[CRASH_DATE])

Related DAX Functions

Time Intelligence Functions

Related Course Modules

Ultimate-Beginners-Guide-To-PowerBI

DOWNLOAD


Download our comprehensive DAX Formula Reference Guide as perfect companion as you learn how to use DAX formulas within Power BI.


Download DAX Formula Reference Guide