Forum Discussion
NicoleBruno
4 years agoValued Contributor
Copy Actual to Forecast issue
Hi all,
We have a simple copy calculation on a forecast scenario that copies in the actuals data for certain periods, defined in a text field. We've had it for years and it generally works fin...
- 4 years ago
HI Nicole - where is this calculation written? If it is NOT a Custom Calc, you could move this to FP 16. This would ensure its the last thing to run and if its successful, it likely points to a formula pass issue and/or another formula overwriting those numbers.
A few other unrelated items:
- this does not have any Entity conditions - does it need to run at parent Entities for any reason?
- the current month can easily be grabbed with api.Time.GetPeriodNumFromId(api.Pov.Time.MemberId) rather than parsing the time name
NicoleBruno
4 years agoValued Contributor
An update to my original based on more testing, if I comment out the "api.Data.Calculate("S#..." line and add in an entity filter and a very specific calculate line, the data that's missing gets copied and then translates on it's own when I consolidate. I can't find any other calculations for this scenario, account, UD2 or UD4 that might be overwriting/wiping out the intersection when I have the full copy line in. Also, if I have the two calc lines (the original plus the one below), the specific intersection I'm having issues with doesn't copy. It only works if the more general calculate line is commented out.
Here's the filter and updated calculate line I tested that finally made that specific intersection appear:
FILTER: If (api.Cons.IsLocalCurrencyForEntity() ) Then
SPECIFIC CALC: api.Data.Calculate("S#LBE03_working:V#Periodic:A#ACC_SAP_535110:U2#PC_2287:U4#None = S#Actual:V#Periodic:A#ACC_SAP_535110:U2#PC_2287:U4#None")
- EricOsmanski4 years ago
OneStream Employee
Even though its a scenario formula, you could comment it out and then put the formula on another member (could create a new one for testing even), set it to FP16 and then paste the formula in there. But that is a very common troubleshooting technique which will give you more information to help diagnose.
If there are no reasons to run on parents, you could use If (Not api.Entity.HasChildren()) as a condition before the rule. It'll definitely speed things up by not running at Entities unnecessarily.
- NicoleBruno4 years agoValued Contributor
Hi Eric,
Thanks for the suggestion! I commented out the scenario formula entirely and added a new account member with the formula. It worked and copied everything correctly, no matter if the formula was set at FP1 or FP16. I'm honestly not sure what that's telling me though... The copy formula works when it's set on a revenue account (scenario type forecast and default time), no matter the formula pass number but it doesn't entirely work correctly when it's set on the forecast scenario itself.
I would appreciate any thoughts you might have! And thanks for getting me to this point.
- EricOsmanski4 years ago
OneStream Employee
Do you have any BRs assigned to BR 1 and 2 on the Cube? Those run between the Scenario formulas and FPs as part of the DUCS.