Calculation Function  Minus Disposal Month
Hi Everyone,
I need some help in building a model.
So basically, from the above image, I have manage to read the Total Nominate TEUS for each month but I'm not sure How to:
1) let the system to know that, if there's a disposal in a particular month (eg. March and June) then the follow month (Apr and Jul in this example) will use the previous total nominate TEUs  the disposal nominate,
2) and in the subsequent month it will read the latest Total Nominate TEUs.
I have actually created a Boolean in Anaplan, which I think might be needed in the case. (I was trying IF THEN ELSE function but I got stuck)
Thank You!
Best Answer

Hi @Kayley
I have made some changes after you clarified the part about effective disposal month.
1. INP Vessel TEU.Disposal Effective Mth = PERIOD(ADDMONTHS(Disposal Dates, 1))
2. SYS Mth 3.Effective First Day = ADDMONTHS(START(First Month), 1)
3. CALC TEUs.Disposal TEUs = INP Vessel TEU.Nominal TEUS[SUM: INP Vessel TEU.Disposal Effective Mth]
The above changes are made to cater for a disposal date that took place in the month before the first month of your Model Calendar (assuming Model Calendar is FY20 onwards), i.e. if the disposal happens in Dec19, then the disposal value should appear in Jan20; but if the disposal happens in months before Dec19, then the total disposal values are deducted from the total TEUs before Jan20.
Thanks,
LipChean
1
Comments

Hi @Kayley ,
You might want to try the Previous() function (which allows you to refer the same lineitem itself).
As you have already identified the months where the event occurs, you can use IF ELSE in conjunction with the Previous function to achieve the desired result.
Best Regards,
vinayvm
0 
Hi @Kayley
Do see if the following works.
I have added something extra to cater for disposal dates being earlier than the first day of your model calendar.
The values in 'CALC TEUs.Final TEUs' doesn't match your screen shot because i intentionally added a disposal date earlier than 1 Jan 2020 for Vessel G, but you'll find that the values calculated will match yours if you removed the Disposal Date for Vessel G.
Thanks,
LipChean
0 
Thank you for your explanation, however when i deduct the disposal it will happen the following month. meaning to say if disposal is on 31st March 2020, then final TEU in April 2020 will deduct the disposal TEUs instead of March.
0 
Thank You so much!!0