4 Replies Latest reply: Oct 19, 2010 2:09 PM by s j

# Change a MINUS to POSITIVE

Hi,

Is there an easy way of changing a MINUS figure to a positive figure in an expression?

I have to use an expression to calculate a column. I am calculating 2 fields (SalesValue and RSPValueDiff)

SalesValue = the price the product was sold for

RSPValueDiff = The difference between the current RSP (standard price) and the SalesValue (the Actual selling price)

I have not got a field which gives me the RSP, so i am trying to calculate it by adding the 2 fields above together. the problem i have is that the RSPValueDiff is a MINUS figure.

E.g.

Coca cola sold for 0.55 pence (SalesValue) which is -0.20 pence lower than the RSP (RSPValueDiff) . but if i add both fields up, i would get 0.35 Pence, when it should add up to 0.75 pence.

How can i calculate the RSP correctly?

• ###### Change a MINUS to POSITIVE

write

sum(SalesValue)*-1

• ###### Change a MINUS to POSITIVE

Excellent, thanks very much.

• ###### Change a MINUS to POSITIVE

Try fabs(SalesValue) - this will make all numbers absolute values (no negative values)

/Martin

• ###### Change a MINUS to POSITIVE

multiply minus value by -1.