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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ronaldbalza2023
Continued Contributor
Continued Contributor

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

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]

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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