Skip to main content

Celonis Product Documentation

ABS
Description

ABS is a mathematical function that returns the absolute (positive) value of a specified numeric expression.

ABS changes negative values to positive values. ABS has no effect on zero or positive values.

One exception is the minimum integer value, which is mapped to itself (because of Two's complement).

It can be applied to INT or FLOAT columns.

Syntax
  ABS ( table.column )
 
NULL handling

If the input value is NULL, the result is NULL as well.

Example

[1]

ABS with one negative value and one null value

Query

Column1

         ABS ( "Table1"."Column1" )
        

Input

Output

Table1

Column1 : int

1

-1

0

null

Result

Column1 : int

1

1

0

null

[2]

ABS for the minimum value (negative) is also negative (because of Two's Complement).

Query

Column1

         ABS ( "Table1"."Column1" )
        

Input

Output

Table1

Column1 : int

-9223372036854775808

Result

Column1 : int

-9223372036854775808