Anakardian
Registered User.
- Local time
- Today, 21:44
- Joined
- Mar 14, 2010
- Messages
- 173
I have been working for a while on getting a rather complicated calculation working right but after getting it to work I have been hitting the wall with a head that feels like a pinball ball.
The following calculation works for calculating the amount for each line for [IncentiveAmount] in the report:
When I try to sum it up, it returns an #Error when using
The alternative I have found is to wrap the first code section with =sum() but this gives the same result.
Can someone help me find the door in this wall?
The following calculation works for calculating the amount for each line for [IncentiveAmount] in the report:
Code:
=IIf([MarpolViolationCheck]="No" ,IIf([DetainedCheck]="No" ,IIf([FocusVesselCheck]="Yes" ,IIf([VettingPerformance]=1 ,FormatCurrency(DLookUp("[InitialIncentiveAmount]" ,"tblParameters","[ParametersID]=1") ,2)*IIf([TradeableVesselFactorMet]="Yes" ,1 ,0,7)*[Multiplier] ,(FormatCurrency(DLookUp("[InitialIncentiveAmount]","tblParameters","[ParametersID]=1") ,2)*([ActualTargetsMet]/5)*0,7)+IIf([TradeableVesselFactorMet]="Yes" ,0,3 ,0)*FormatCurrency(DLookUp("[InitialIncentiveAmount]","tblParameters","[ParametersID]=1") ,2)),(FormatCurrency(DLookUp("[InitialIncentiveAmount]","tblParameters","[ParametersID]=1") ,2)*([ActualTargetsMet]/5)*0,7)+IIf([TradeableVesselFactorMet]="Yes" ,0,3 ,0)*FormatCurrency(DLookUp("[InitialIncentiveAmount]","tblParameters","[ParametersID]=1") ,2)),FormatCurrency(0 ,2)),FormatCurrency(0 ,2))*[Days]/365
Code:
=sum([IncentiveAmount])
Can someone help me find the door in this wall?