Forecast Seeding not working for AdjInput

Beeswing77
New Contributor III

Hi,

I'm trying to copy data from Actuals into Forecast,  but it seems to only work for Input and Forms Origin members, and not for Adj. Here is my formula, which I put on the Forecast Scenario:

'Copy data from Source Scenario for months 1-5
Dim currMonthNum As Integer = api.Time.GetPeriodNumFromId(api.Pov.Time.MemberId)
Dim sScenario As String
Dim ScenarioSource As String = api.Scenario.Text(api.Pov.Scenario.MemberId, 1)

If ScenarioSource = "" Then
	sScenario = api.Pov.Scenario.Name
Else
	sScenario = ScenarioSource
End If

If currMonthNum = 1 Or currMonthNum = 2 Or currMonthNum = 3 Or currMonthNum = 4 Or currMonthNum = 5 Then
	If api.Cons.IsLocalCurrencyforEntity() And Not api.Entity.HasChildren() Then
		api.Data.Calculate("S#Forecast2:A#All = S#" & sScenario & ":A#All")
		api.Data.Calculate("S#Forecast2:A#All:O#AdjInput = S#" & sScenario & ":A#All:O#AdjInput")
	End If
End If
Not sure what I'm doing wrong.  Any ideas?
 
Thanks!
2 ACCEPTED SOLUTIONS

You can write to AdjInput using api.data.calculate. Below is the simple formula which i ran using custom calculate DM job.

 

api.Data.Calculate("O#AdjInput:'all other filter'=O#Forms:'all other filter'")

 

You can see the blue coloured cell which indicates calculated cell for AdjInput  member.

OS_Pizza_0-1683827004957.png

 

View solution in original post

Michel_Sabourin
Contributor II

You shouldn't have to specify AdjInput separately. Typically, for the items not specifically spelled out in the calculations, it will do the calc at all levels, meaning it should copy from Import, Forms, AdjInput, etc on its own.

View solution in original post

4 REPLIES 4

Beeswing77
New Contributor III

Replying to myself,  as I think I have the answer.  It seems you can't write to the AdjInput member using Calculate.  Can anyone confirm that?

I just changed my formula to:

api.Data.Calculate("S#Forecast2:A#All:O#Import = S#" & sScenario & ":A#All:O#BeforeElim")

Which seems to work, although we'll lose a little granularity as to what was a journal vs input data in the source scenario. We can probably live with that though.

 

 

You can write to AdjInput using api.data.calculate. Below is the simple formula which i ran using custom calculate DM job.

 

api.Data.Calculate("O#AdjInput:'all other filter'=O#Forms:'all other filter'")

 

You can see the blue coloured cell which indicates calculated cell for AdjInput  member.

OS_Pizza_0-1683827004957.png

 

Michel_Sabourin
Contributor II

You shouldn't have to specify AdjInput separately. Typically, for the items not specifically spelled out in the calculations, it will do the calc at all levels, meaning it should copy from Import, Forms, AdjInput, etc on its own.

Thanks..  that's what I expected at first.  

In the end, I worked out that someone had left a 'api.Data.ClearCalculatedData'  which was a bit too general,  and that was clearing my AdjInput data in the target scenario.   It wasn't Calculated Data in the source scenario, so was not getting cleared there.  Hence the mismatch.