Solved

# Calculate three fields

Posted on 2013-06-21

Running CR 10

Looking for profitability using 3 fields. Two fields are in one table and one is another, all display currency records. One of the fields only returns currency when it has data otherwise its blank which is causing problems trying to calculate using the other fields. Below are the fields and sample data:

tblSO.sellprice

tblSO.cost

tblsubcontractor.cost

sellprice socost subcost

SO No. 12345 $200.00 $100.00 $50.00

SO No. 23456 $100.00 $0.00

SO No. 34567 $300.00 $100.00 $100.00

I need to calculate the profit using the fields but because SO No 23456 is blank the formula I'm using is not calculating correctly. Using the formula below shows a profit of $100.00 (seems to only be using the last row instead of all three) should be a total profit of $250.00.

{tblSO.sellprice} - ({tblSO.cost} + {tblsubcontractor.cost})

Formula is used in GH1 (tblSO.sonumber) and RFa