Time Intelligence- Cumulative Total

Sonova

New Member
Joined
Feb 21, 2017
Messages
24
Hi

I am trying to create a time intelligent function that will calculate the cumulative Forecast total based on a year time filter/slicer selection.

In addition to this the cumulative total should cut off at the last actual transaction for the current year which is Feb 2017.

My formulas work for the 2015 and 2016 year but when I select the 2017 year it will calculate the total forecast up until December 2017.

My Formulae to do this are below, to calculate the last actual and the cum total, I am not sure how to condition the cum total formula to cut off for the 2017 period.

Code:
Last Actual:=CALCULATE( LASTDATE( MonthlyData[StartOfMonth] ) , FILTER( ALL( MonthlyData ), NOT( ISBLANK( MonthlyData[Actual] ) ) ) , ALL( Categories ) )

Code:
CumTotal=IF( FIRSTDATE( 'Calendar'[Date] ) <= [Last Actual] ,calculate(sum([Forecast]),filter(ALL('Calendar'[Date]) ,'Calendar'[Date]<=max('Calendar'[Date]))))


Forecast 2015Forecast 2016Forecast 2017 (Full Year)
6 67196 3021 206 760
Desired Result
Measure (Slicer 2015)Measure (Slicer 2016)Measure (Slicer 2017)Incorrectly Calculated for 2017
6 671102 973162 4611 309 733
Calculation(6 671 + 96 302)(6 671 + 96 302 + Jan2017+ Feb2017 )( 6 671 + 96 302 + 1 206 760)

<tbody>
</tbody>
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I have found the solution to my issue.

Code:
=CALCULATE( 	[Sum Forecast] , 
	FILTER( 
	ALL( 'Calendar'[Date] ) , 
	'Calendar'[Date] 
		<= if(
			'Calendar'[Date]<=[Last Actual], 
			MAX( MonthlyData[StartOfMonth] ) , 
			[Last Actual]
		)
	)
)
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,660
Members
449,114
Latest member
aides

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top