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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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