 # Custom-Calculation

Hi All, I am trying to use a custom calculation for Profit. Trying to include the freight loss/gain in customer profit. Looks like when I am adding the freight loss/gain to the order processing cost even if its a loss it is adding that rather than subtracting! Is there a way around this? or I am doing something different?
This is my custom calculation (B-((A*20)+(C-D)))
IF C-D is negative which is my freight charged- freight cost it would ideally subtract it right? (I am using brackets to make sure it follows BODMAS)

Hi Muskaan-Travers,

Is your source data GL structured, as in the form of debits and credits? If it’s freight revenue and expense from your P&L, the signs are likely reversed. Freight charged (income) would reflect the reduction of the liability and therefore a negative number whereas freight cost (expense) would be an increase to the liability and would be a positive number. If true, that means you would be subtracting a positive number against a negative number. The two negatives cancel and the numbers would “add” (i.e. -5 - 5 = -10). If this is the case, simply change the (-) to a (+) or take each variable times -1 before you subtract. ((C*-1)-(D*-1))

1 Like