cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ronaldbalza2023
Advocate II
Advocate II

Stopping Cumulative Total

Hi everyone, how can I stop my cumulative total on calculating when no actual values on subsequent days/months. I do have my date filtered in Year. Thanks in advance.

ronaldbalza2023_0-1631588848409.png

Here are my two measures respectively:

Bank Movements (Cummulative) = [Op Bal Interim Bank Transactions] +
CALCULATE( 
	[Bank Movement] , 
	FILTER(
		ALLSELECTED( Dates),
		Dates[Date] <= MAX( Dates[Date])
	)
)

 

Bank Movements (Cumulative) New Measure = 
 IF (
        SELECTEDVALUE ( Dates[Date] ) > [Last Sales Date],
        BLANK (),
        CALCULATE (
            [Bank Movement],
            FILTER ( ALLSELECTED ( Dates ), Dates[Date] <= MAX ( Dates[Date] ) )
        )
    ) + [Op Bal Interim Bank Transactions]
    

 

1 ACCEPTED SOLUTION

@ronaldbalza2023 , hope in this measure you have not added +0 or handled blank value using if

Op Bal Interim Bank Transactions

 

remove +0 or any blank handling

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ronaldbalza2023 , Try a new measure like

 

Bank Movements (Cumulative) New Measure =
var _max = maxx(allselected(Dates),Dates[Date])
return
CALCULATE (
[Bank Movement],
FILTER ( ALLSELECTED ( Dates ), Dates[Date] <= MAX ( Dates[Date] ) && Dates[Date] <=_max )
)
+ [Op Bal Interim Bank Transactions]

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Hi @amitchandak, It did the same thing as on my two measures. Was it because of my filter?

ronaldbalza2023_1-1631589688797.png

 

@ronaldbalza2023 , hope in this measure you have not added +0 or handled blank value using if

Op Bal Interim Bank Transactions

 

remove +0 or any blank handling

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors