Joined: 22 May 2010
Online Status: Offline
Posts: 15
Topic: Formula - Compare Neg Numbers Posted: 01 May 2013 at 3:03pm
So here is a challenging one.
I have two formulas that perform a calculation and return a number for each result. When I hover over the result it is in fact seeing the result as a number and not a string.
I then have a third formula:
if X > Y then "X is bigger"
Else X < Y then "X is smaller"
It works great but in one instance I’m comparing two negative values. The value are -28 and -7
Crystal returns that -28 is a bigger value then -7? What??
Of course if I create a straight formula that only has the numbers in it and not a result from another formula crystal knows that -28 is smaller than -7
Any thoughts?
May be when you are comparing two values, it will take negetive highest number i.e. value wise it may be low but when u compare -28 is bigger than -7 in negetive format.
Joined: 22 May 2010
Online Status: Offline
Posts: 15
Posted: 02 May 2013 at 5:22am
thanks for the reply. I verified the values that were being used. It must have been something further up stream that was causing an issue.
I developed a work around by adding 100 to each value then doing the comparison. That way the lowest value I would ever have is 0. -100 by adding 100 all my comparisons will be a positive number.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum