Power Query
Search…
Number.Sign

Number.Sign

Returns 1 if the number is positive, -1 if it is negative, and 0 if it is zero.
function (optional number as nullable any) as nullable any

Description

Returns 1 for if number is a positive number, -1 if it is a negative number, and 0 if it is zero. If number is null, Number.Sign returns null.

Category

Number.Operations

Examples

Determine the sign of 182.
1
Number.Sign(182)
Copied!
1
Determine the sign of -182.
1
Number.Sign(-182)
Copied!
-1
Determine the sign of 0.
1
Number.Sign(0)
Copied!
0
Last modified 3yr ago