OpenBI Docs Buy

SIGN

1 for a positive number, -1 for a negative one, 0 for zero.

Group: Math. Compatible with DAX.

Syntax

SIGN ( <number> )
ParameterTypeDescription
numberNumberThe number whose sign is wanted.

Returns

Whole number. 1 when the number is above zero, -1 when it is below, 0 when it is zero.

Remarks

  • Any positive number, however small, gives 1; any negative one gives -1.
  • A blank gives BLANK, not 0.
  • Handy to pick an arrow or a colour for a change: SIGN ( [Liters change] ) is 1 for growth and -1 for a fall.

Examples

Three signs and a blank

EVALUATE
ROW (
    "Of -5", SIGN ( -5 ),
    "Of 0", SIGN ( 0 ),
    "Of 0.001", SIGN ( 0.001 ),
    "Of blank", SIGN ( BLANK () )
)
Of -5Of 0Of 0.001Of blank
-101(blank)

ABS, IF, SWITCH.

Last updated · OpenBI Studio 0.3.74