Forum Discussion

Justin_Zurn's avatar
Justin_Zurn
New Contributor
15 hours ago

Orders calculation formula using Backlog and Sales Accounts

Hello,

I'm attempting to create an orders (500055) account, calculated using existing Backlog (500054) and Sales (100020) Accounts.   (Current Month Backlog - Prior Month Backlog + Current Month Sales)

When I run this calculation in the forecast scenario, February - December work as expected, but there is an issue with January that I can't pinpoint.  Any ideas where I've gone wrong?

Thank you in advance,

Justin Trad

 
 
 
If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity)) And api.Time.GetPeriodNumFromId(api.Pov.Time.MemberID) = 1 Then
   
api.data.calculate("A#500055:T#PovYearM1:O#import:U1#none:U2#none:U5#none:U6#none = (A#500054:T#PovYearM1:O#top:U1#top:U2#top:U5#top:U6#top - A#500054:T#PovPriorYearM12:O#top:U1#top:U2#top:U5#top:U6#top) + A#100020:T#PovYearM1:O#top:U1#top:U2#top:U5#top:U6#top")
 
Else If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity)) Then
                                       
api.data.calculate("A#500055:T#Pov:O#import:U1#none:U2#none:U5#none:U6#none = (A#500054:T#Pov:O#top:U1#top:U2#top:U5#top:U6#top - A#500054:T#PovPrior1:O#top:U1#top:U2#top:U5#top:U6#top) + A#100020:T#Pov:O#top:U1#top:U2#top:U5#top:U6#top")
 
End If
No RepliesBe the first to reply