ABSOLUTE VALUE( NUM )
Placeholder | Tooltip | Replace With |
NUM | n: Number | A number value for which you want the absolute value returned. Can be a Number variable or a fixed number value. |
Returns a Number value
Using the ABSOLUTE VALUE expression, you can find the absolute value of a given number. You can calculate a negative number, but have it appear as a positive number.
For example, you may need to send a notice to a client about an account balance. Not knowing whether it will be a positive or negative balance, you would create the computation Absolute Value of Final Balance, which would return a positive expression, regardless. The computation script is:
ABSOLUTE VALUE( Final Balance )
Once you have created the computation, you can use an IF/ELSE expression to merge the desired text with the correct value in the document:
«IF Final Balance < 0»
Your account is $«Absolute Value of Final Balance» overdrawn.
«ELSE»
You have $«Absolute Value of Final Balance» in your account.
«END IF»