Skip to main content

ABS

The ABS function is a mathematical function that returns the absolute value.

The ABS function is compatible with multiple data types and the ? parameter means that the value can be nullable.

Syntax

double? ABS(double? value)
decimal? ABS(decimal? value)
int? ABS(int? value)
short? ABS(short? value)
float? ABS(float? value)
long? ABS(long? value)

Example

For example the absolute value of a number is the distance of the number from zero on a number line, regardless of its sign. For example, the absolute value of -5 is 5, and the absolute value of 5 is also 5.

So using the syntax ABS(int? value) you can calculated the absolute value of -26.

ABS(-26)

This would return 26.


If we take a float of -3.14159 and look for the absolute value, using the syntax ABS(float? value) we would get 3.14159.

This would look like the following function inside calculated columns:

ABS(-3.14)

To use this function with your column data you can enter the column name as the value. For example if we want to calculate the absolute value of a longitude column named LocationLongitude then the function would be:

ABS(LocationLongitude)