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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RamiSomar
Frequent Visitor

Filling Last NonBlank Available Balance for dates with no transactions

I've recently started to use DAX, I need your help for DAX function to get below disired table. 

Current table linked to calander table, Current table is simply presenting daily closing balance for 4 bank accounts with four differecne currenies. Missing dates are supposed to have last available balance. 

Thanks in Advance. 

 

Untitled.png

1 ACCEPTED SOLUTION

 

 

Bal = 
var d = SELECTEDVALUE(Calendar_Table[Date])
return 0+CALCULATE(
    LASTNONBLANKVALUE(
        Calendar_Table[Date],sum('Historical MT940'[Closing Balance])
    )
    ,Calendar_Table[Date]<=d
)

 

 

Also set your Calendar_Table[Date] field to "Show items with no data".

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

please provide the sample data in usable format (paste as table or attach).

 

 

Bal = 
var d = SELECTEDVALUE(Calendar_Table[Date])
return 0+CALCULATE(
    LASTNONBLANKVALUE(
        Calendar_Table[Date],sum('Historical MT940'[Closing Balance])
    )
    ,Calendar_Table[Date]<=d
)

 

 

Also set your Calendar_Table[Date] field to "Show items with no data".

 

Many thanks, it works perfectly. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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