The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
AHaslett
1 year agoNew Contributor
Beginning Balance Formula
Our beginning balance formula is as follows:
'Check to see if we are in period 1 If api.Time.IsFirstPeriodInYear() Then
.........
Else
...............
This formula worked perfectl...
T_Kress
OneStream Employee
1 year agoA normal BEGBALCALCYTD will always pull the prior ending balance into all periods of the current year. This is typically done with an IF statement where if period 1 of the current year, it will pull the ending balance of the prior year. Then IF periods 2 – 12 of the current year it can simply look back at period 1 of the current year. And this is normally a member formula found in your Flow dimension.
This is done for efficiency reasons. You only want to look back at prior year once, in period 1. Then in periods 2 – 12 you can simply pull that forward from period 1. This is more efficient than every period in the current year having to look back at prior year.
Here is that sample code, in a very simple form:
Dim PeriodNum As Integer = api.Time.GetPeriodNumFromId(api.Pov.Time.MemberId)
If PeriodNum = 1 Then
api.Data.Calculate("F#BEGBALCALCYTD = RemoveNoData(F#ENDBAL:T#PovPriorYearM12)")
Else
api.Data.Calculate("F#BEGBALCALCYTD = RemoveNoData(F#ENDBAL:T#PovPrior)")
End If
But is sounds like what you may want is a periodic BEGBALCALCMTD calculation instead. This is one where each period simply needs to refer to the prior period’s ending balance. This is not standard for a normal cash flow and beginning balance calculation, but you can add a member called BEGBALCALCMTD or BEGBALCALCPERIOD and get this calculation to work.
It would be something like this:
api.Data.Calculate("F#BEGBALCALCMTD = RemoveNoData(F#ENDBAL:T#PovPrior)")
Related Content
- 2 years ago
- 2 years ago
- 1 year ago
- 2 years ago