Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Arithmetic Expression - Negative to Positive Values

The field Difference points to the variable $(Difference). This variable was defined as the difference between two fields. I am getting this correct. I have defined the field Mod Difference as $(Difference)*-1 . That is I have multiplied by -1. I am getting different values as result. I am not able to understand why the values are totally different if multiplied by -1. Is any thing wrong with my expression?

I actually wanted to convert values to positive if the difference was negative. Is there any function to do it or do I need to resort to this expression of multiplying by -1?

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

first

the question is what value you have in your variable because it seems the only part of the sum is multiply by -1

two ways that might help you

($(Difference))*-1 or fabs($(Difference))

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

first

the question is what value you have in your variable because it seems the only part of the sum is multiply by -1

two ways that might help you

($(Difference))*-1 or fabs($(Difference))

Not applicable
Author

Thanks. Your suggestion works. The extra pair of braces was the difference. Also, the Fabs function works.