4 Replies Latest reply: Jun 13, 2012 11:14 AM by Jonathan Dienst

# Compare 2 Values

Hi Guys,

i wonder if you can help me i have a straight table with two values i would like to add an expression on there that shows me the difference between the two values but im not sure how to do this

could someone please point me in the right direction

• ###### Compare 2 Values

Hi

If the two values are in columns 1 and 2 respectively, then you can use

=Column(1) - Column(2)

Note that column 1 is the first expression, and Column() refers to the expression values. You can't get the dimensions in the same way

Hope that helps

Jonathan

• ###### Re: Compare 2 Values

Thanks Jonathan thats great

• ###### Re: Compare 2 Values

Hi Jonathan,

do you happen to know how i can exclude anything with a difference of 0?

• ###### Re: Compare 2 Values

Hi

Just make sure all your expressions return null or 0 if column(1) = column(2).

I think you will need to use the actual expressions, rather than column().

Expression 1:  If(<expr1> = <expr2>, 0, <expr1>)

Expression 2:  If(<expr2> = <expr1>, 0, <expr2>)

Expression 3:  Column(1) - Column(2)

Where <expr1> and <expr2> are the current expressions in columns 1 & 2.

Regards

Jonathan