Any iq gurus lurking? Need help with formula

ODTech

Senior Member
Joined
May 9, 2010
Messages
877
[SUM(IIF(<Transactions."CODE"> = '10004',<Transactions."QUANTITY">,0))]

[SUM(IIF(<Transactions."TCode"> = 'IN',<Transactions."QUANTITY">,IIF(<Transactions."TCode"> = 'CN',-<Transactions."QUANTITY">,0)))]

On the report we want to subtract sales and returns to only show the amount of moved stock but the above formula show the combined sales and returns. How do we get it to subtract and not add?
 

Hamster

Resident Rodent
Joined
Aug 22, 2006
Messages
34,256
Maybe try something like:
Code:
sum(value1, value2*-1)
?
 
Top