Table of contents
TOC
Collapse the table of content
Expand the table of content

ABS Function (DAX)

Owen Duncan|Last Updated: 5/22/2018

Returns the absolute value of a number.

Syntax

ABS(<number>)  

Parameters

TermDefinition
numberThe number for which you want the absolute value.

Return Value

A decimal number.

Remarks

The absolute value of a number is a decimal number, whole or decimal, without its sign. You can use the ABS function to ensure that only non-negative numbers are returned from expressions when nested in functions that require a positive number.

Example

The following example returns the absolute value of the difference between the list price and the dealer price, which you might use in a new calculated column, DealerMarkup.

=ABS([DealerPrice]-[ListPrice])  

See Also

Math and Trig Functions (DAX)
SIGN Function (DAX)

© 2018 Microsoft