Page tree


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.

Basic Usage

Column reference example:

derive type:single value:ABS(MyInteger) as:'abs_MyInteger'

Output: Generates the new abs_MyInteger column containing the absolute value of each value found in the MyInteger column.

Numeric literal example:

delete row:(ABS(MyInteger) == 5)

Output: Deletes all rows from the dataset in which the absolute value of the entry in the MyInteger column is 5.

Syntax and Arguments

derive type:single value:ABS(numeric_value)

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

For more information on syntax standards, see Language Documentation Syntax Notes.


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

  • Missing input values generate missing results.
  • Literal numeric values should not be quoted. Quoted values are treated as strings.
  • Multiple columns and wildcards are not supported.

Usage Notes:

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


Tip: For additional examples, see Common Tasks.

Example - Basic ABS function


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



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

derive type:single value: ABS(X) as: 'distanceX'

derive type:single value: ABS(Y) as: 'distanceY'



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

See Also for ABS Function:

This page has no comments.