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
OlofA
2 years agoNew Contributor II
Formula for same period previous year
I'm trying to write a business rule creating a KPI which returns the value of an account for same period previous year.
I already have a working business rule creating a KPI which returns the value...
- 2 years ago
This should do it:
Dim currYear As Integer = api.Pov.Time.MemberId Dim lastYear As Integer = api.Time.AddYears(currYear, -1) Dim prevPeriod As String = api.Time.GetNameFromId(lastYear) Return api.Data.GetDataCell($"A#38999:T#{prevPeriod}").CellAmount
RobbSalzmann
2 years agoValued Contributor II
This should do it:
Dim currYear As Integer = api.Pov.Time.MemberId
Dim lastYear As Integer = api.Time.AddYears(currYear, -1)
Dim prevPeriod As String = api.Time.GetNameFromId(lastYear)
Return api.Data.GetDataCell($"A#38999:T#{prevPeriod}").CellAmount
- Thanos_A_cpg2 years agoNew Contributor II
You may be able to use
Return api.Data.GetDataCell("A#38999:T#POVPrior12").CellAmountThis will allow you to get the same results without extra code.
Cheers,
Thanos
Related Content
- 2 years ago
- 2 years ago
- 1 year ago
- 1 year ago