OpenBI Docs Buy

ABS

A number without its sign.

Group: Math. Compatible with DAX.

Syntax

ABS ( <number> )
ParameterTypeDescription
numberNumberThe number to take the size of; its sign is dropped.

Returns

Number. The number without a minus sign, of the same type as the number given.

Remarks

  • A negative number comes back positive; zero and positive numbers come back unchanged.
  • A blank gives BLANK.
  • A whole number stays a whole number and a Currency value stays a Currency value.
  • Text holding a number is read as that number: ABS ( "-2" ) is 2.
  • Subtracting one date from another gives a date; ABS turns the difference into a plain number of days, whichever date is the later one.

Examples

Numbers without their signs

EVALUATE
ROW (
    "Of -3.5", ABS ( -3.5 ),
    "Of 4", ABS ( 4 ),
    "Of blank", ABS ( BLANK () )
)
Of -3.5Of 4Of blank
3.54(blank)

Days between two dates in either order

EVALUATE
ROW ( "Days", ABS ( DATE ( 2025, 1, 1 ) - DATE ( 2025, 3, 1 ) ) )
Days
59

SIGN, INT, TRUNC, ROUND.

Last updated · OpenBI Studio 0.3.74