DAX ABS Function

ABS stands for Absolute Value. It takes a number as input and returns its distance from zero, basically ignoring the positive or negative sign. So, ABS(5) returns 5, and ABS(-3) returns 3.

You can use ABS to convert negative numbers into positives for calculations that only work with non-negative values. Imagine you need to find the difference between sales prices and discounts (both can be negative). ABS can ensure you get the positive difference (markup) for calculations. It can also be nested within other functions to make sure they accept positive inputs.

ABS deals with numbers only. It`s generally not recommended to use it with iterators (a fancy way of looping through data) within DAX.

ABS(number)
ParameterDefinition
numberThe number for which you want the absolute value.

Leave a Reply