Transformation Language Reference > Functions > SIGN
  

SIGN

Returns whether a numeric value is positive, negative, or 0.

Syntax

SIGN( numeric_value )
The following table describes the argument for this command:
Argument
Required/
Optional
Description
numeric_value
Required
Numeric value. Passes the values you want to evaluate. You can enter any valid transformation expression.

Return Value

-1 for negative values.
0 for 0.
1 for positive values.
NULL if NULL.

Example

The following expression determines if the SALES port includes any negative values:
SIGN( SALES )
SALES
RETURN VALUE
100
1
-25.99
-1
0
0
NULL
NULL