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
ingvarp
Frequent Visitor

Cumulative Bank Balance

Hello Everyone,

 

I want to create a measure that calculates the company´s bank balance. 

 

So far, I have used the following code:

 

Cumulative Bank Balance  =
CALCULATE( [ 10122 Amount],
    FILTER(
ALLSELECTED('Date'),
    'Date'[Date] <= MAX('Date'[Date] ))
)
 
which works fine if I want to show the value on a card (current bank balance) or on a visual that starts from the very beginning.
 
But, if I want to see the last year and choose 2023 from the filter, it does not consider the closing balance from 2022 and therefore does show an incorrect value. 
 
Please help me to create a measure that calculates the cumulative amount even if I change the year or month from the filters.
 
Thank you so much!
 
 
 
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Change ALLSELECTED to ALL.

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

Change ALLSELECTED to ALL.

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.