I am attempting to add units sold to a report for last year. I figured using the DateAdd function would be the best way to handle it.
The formula I used is:
but an error comes back and tells me a Boolean is required here. What does that mean and how should I change my formula to have it accept it. I need the {SOP30300.QTYTOINV} to sum if the {SOP30200.DOCDATE} falls in last year else do not add to the sum.
Any help would be appreciated.
Thanks
The formula I used is:
Code:
if (DateAdd ("yyyy",-1 ,{SOP30200.DOCDATE} ))
then {SOP30300.QTYTOINV}
else
0
but an error comes back and tells me a Boolean is required here. What does that mean and how should I change my formula to have it accept it. I need the {SOP30300.QTYTOINV} to sum if the {SOP30200.DOCDATE} falls in last year else do not add to the sum.
Any help would be appreciated.
Thanks