Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
FrankPower-001
Frequent Visitor

CLOSINGBALANCEMONTH BUG?

in CLOSINGBALANCEMONTH is a BUG??

 

Like: You have a quantity per day and you want to know the quantity every last day per month

 

If you use it, it will show the quantity combined with the last date of a month, but when there is no quantity on last date of the month, you dont see a quantity.

 

there are several measures: Northwind database

 

QuantitySum = SUM('Order Details'[Quantity])

ClosingMonth1 = CLOSINGBALANCEMONTH([QuantitySum]; tblCalendar [Date])  , date based on linked calendar

ClosingMonth2 = CLOSINGBALANCEMONTH([QuantitySum]; Orders[OrderDate]), date based on orderdate

ClosingEOM = CALCULATE ( [QuantitySum];ENDOFMONTH ( tblCalendar[Date] ) )

 

in july 1996 there is a quantity on the last date of july, so it works

on august 1996  there is no quantity on last date of august, it does not work (combined with date calendar)

 

see pictures

 

july, with result

 

 

 

Amount JULI.png

 august, no result

 

 

Amount AUG.png

 

 

 

 

 

 

but only based on order date will show the last date which is used (not the last date of a month

 

ANYONE, IS THIS A BUG??

 

 

1 REPLY 1

No it is not a bug - it is working as designed. You need lastnonblank instead. Read my blog here. https://exceleratorbi.com.au/lastnonblank-explained/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.