Computes the absolute value of a given numeric value. The value can be a Decimal or Integer literal or a reference to a column containing numeric values.

Column reference example:

abs(MyInteger)


Output:
 Returns the absolute value of each value found in the MyInteger column.

Numeric literal example:

(abs(MyInteger) == 5)

Output: Returns true if the absolute value of the entry in the MyInteger column is 5.

abs(numeric_value)


ArgumentRequired?Data TypeDescription
numeric_valueYstring, decimal, or integerName of column or Decimal or Integer literal to apply to the function

numeric_value

Name of the column or numeric literal whose absolute value is to be computed.

Required?Data TypeExample Value
YesString (column reference) or Integer or Decimal value-10.5

Example - Basic ABS function

Source:

Your source data looks like the following, which measures coordinate distances from a fixed point on a grid:

XY
-24
-6.2-2
0-4.2
44
15-0.05

Transform:

You can use the following transform to derive the absolute values of these columns, which now measure distance from the fixed point:

Results:

XYdistanceXdistanceY
-2424
-6.2-26.22
0-4.204.2
4444
15-0.05150.05

You can then use POW and SQRT functions to compute the total distance.