09-07-2023 07:27 PM
Hi,
I need to create an account to calculate two values multiply together.
I had set formulapass2 and set the formula as below:
api.Data.ClearCalculatedData("A#COG762D:U1#None",True,True,True)
api.data.calculate("A#COG762D:U1#None = A#COG931:U1#ALLDEPT * A#KPI142:U1#1520")
It shows zeros while A#COG931:U1#ALLDEPT is 100 and A#KPI142:U1#1520 is 25.
May I know why?
Thank you.
09-08-2023 10:03 AM
Hi @michaelkeung !
Have you tried to move it to Formula Pass 16? Did you check that you are on a base member?
09-08-2023 04:33 PM
I fixed it using below:
Dim scnType As ScenarioType = api.Scenario.GetScenarioType()
If (scnType = ScenarioType.Actual Or scnType = ScenarioType.budget) Then
api.Data.ClearCalculatedData("A#COG762D:U1#None",True,True,True)
api.Data.Calculate("A#COG762D:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#SysProLoad:U8#None:I#None:F#EndBalLoad:O#Import = A#COG931:F#EndBal:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#Actual:U8#None:I#None:F#EndBal:O#BeforeElim * A#KPI142:F#EndBal:U1#1520:U2#None:U3#None:U4#None:U5#None:U6#None:U7#Actual:U8#None:I#None:F#EndBal:O#BeforeElim / 100")
End If
09-14-2023 05:43 PM
Hi Michael,
I have a couple of "best practices" tips for your member formula....
Obviously you can keep what you have since it's working but it's also important to know what I've mentioned above. Hope it helps!