Last active
August 29, 2015 14:06
-
-
Save webbyworks/5b3d9f7627a68217d6f8 to your computer and use it in GitHub Desktop.
Calculates the Opening Weekly Balance of our Cash Flow Cube Sheet in Adaptive Planning. Assuming that there is a standard account listing the Initial Opening Balance of the fiscal year (code: OBal) it will then find the previous Closing Balance figure from the prior week to be the Opening Balance of the active week.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( isBlank( ASSUM.CF.WeekNum ), 0, | |
if ( isBlank( ACCT.CF.OBal ), | |
if ( ASSUM.CF.WeekNum = 1, | |
if ( ASSUM.WksMonth[time=this-1] = 5, ACCT.CF.CBalWeekly[time=this-1,Weeks=Week 5], ACCT.CF.CBalWeekly[time=this-1,Weeks=Week 4]) | |
, | |
if( ASSUM.CF.WeekNum = 2, ACCT.CF.CBalWeekly[Weeks=Week 1], | |
if ( ASSUM.CF.WeekNum = 3, ACCT.CF.CBalWeekly[Weeks=Week 2], | |
if ( ASSUM.CF.WeekNum = 4, ACCT.CF.CBalWeekly[Weeks=Week 3], | |
if ( ASSUM.CF.WeekNum = 5 AND ASSUM.WksMonth = 5, ACCT.CF.CBalWeekly[Weeks=Week 4], 0 ) | |
) | |
) | |
) | |
) | |
, | |
ACCT.CF.OBal | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment