vasantharaidu
4 months agoNew Contributor II
Scenario - Same value every year for specific account
Hi Guys,
We got a request from user to get data from 2023M12 from actual scenario to forecast scenario.
for Balace sheet accounts, the value from 2023M12 to be same till 2024M12 for specific acco...
- 4 months ago
Hi Eric,
Appreciated for your help, but this code not giving the output what we needed. also i tried with simple code to get last year number to this year. Finally i got the expected value in all the period.
Dim curTimeId As Integer = api.Pov.Time.MemberId Dim lastPerPYId As Integer = api.Time.GetLastPeriodInPriorYear(curTimeId) Dim lastPerPY As String = api.Time.GetNameFromId(lastPerPYId) Dim curYear As String = api.Time.GetNameFromId(api.Time.GetYearFromId(curTimeId)) If (Not api.Entity.HasChildren()) Then 'AndAlso api.Cons.IsLocalCurrencyForEntity() AndAlso api.pov.Scenario.Name.XFEqualsIgnoreCase("FCST_6_6_Test_Same_value") AndAlso curYear.XFEqualsIgnoreCase("2024") Then ' No need to redeclare lastPerPY here, reuse it lastPerPY = api.Time.GetNameFromId(lastPerPYId) Api.Data.Calculate("A#121010:V#YTD:O#Import:U2#None:U3#None:U4#None:U5#None:U6#None:U7#GL_Load:U8#None = S#Actual_Proforma:A#121010:V#YTD:T#" & lastPerPY & ":O#Top:U2#None:U3#None:U4#None:U5#None:U6#None:U7#Top:U8#None") End If