ABS
A number without its sign.
Group: Math. Compatible with DAX.
Syntax
ABS ( <number> )
| Parameter | Type | Description |
|---|---|---|
number | Number | The 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.5 | Of 4 | Of blank |
|---|---|---|
| 3.5 | 4 | (blank) |
Days between two dates in either order
EVALUATE
ROW ( "Days", ABS ( DATE ( 2025, 1, 1 ) - DATE ( 2025, 3, 1 ) ) )
| Days |
|---|
| 59 |