DAX Function Guide

CLOSINGBALANCEMONTH
Empty image or helper icon

Sam McKay

CEO & Founder

How does the CLOSINGBALANCEMONTH work?
The CLOSINGBALANCEMONTH function (DAX) is a type of time intelligence function in DAX that evaluates the expression at the last date of the month using the current context. Like all series functions, the CLOSINGBALANCEMONTH requires contiguous dates to work.
CLOSINGBALANCEMONTH Formula Syntax

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

How do you use the CLOSINGBALANCEMONTH?

The CLOSINGBALANCEMONTH function is used to generate balance sheet values during instances where we want to view the inventory balance at the end of a period.

This function is not used in DirectQuery mode.

Related Blog Posts

Loading

Considerations when using the CLOSINGBALANCEMONTH?

The CLOSINGBALANCEMONTH has three parameters: the table expression that returns a scalar value, the column that contains dates, and the filter that applies to the current context.

Related Video Tutorials

Loading

Formula examples using the CLOSINGBALANCEMONTH

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

= CLOSINGBALANCEMONTH ( SUMX (ProductInventory, [UnitsBalance]*[UnitCost]),ProductInventory[InventoryDate] )

=CLOSINGBALANCEMONTH(Sum([SalesAmount]), ‘DimDate'[FullDateAlternateKey], ALL(‘DimDate'[FullDateAlternateKey]))

Related Courses

Loading