# Math and Trig Functions

The mathematical functions in DAX are very similar to the Excel mathematical and trigonometric functions.

Function Description
ABS Returns the absolute value of a number.
ACOS Returns the arccosine, or inverse cosine, of a number. The arccosine is the angle whose cosine is number. The returned angle is given in radians in the range 0 (zero) to pi.
ACOSH Returns the inverse hyperbolic cosine of a number. The number must be greater than or equal to 1. The inverse hyperbolic cosine is the value whose hyperbolic cosine is number, so ACOSH(COSH(number)) equals number.
ACOT Returns the principal value of the arccotangent, or inverse cotangent, of a number.
ACOTH Returns the inverse hyperbolic cotangent of a number.
ASIN Returns the arcsine, or inverse sine, of a number. The arcsine is the angle whose sine is number. The returned angle is given in radians in the range -pi/2 to pi/2.
ASINH Returns the inverse hyperbolic sine of a number. The inverse hyperbolic sine is the value whose hyperbolic sine is number, so ASINH(SINH(number)) equals number.
ATAN Returns the arctangent, or inverse tangent, of a number. The arctangent is the angle whose tangent is number. The returned angle is given in radians in the range -pi/2 to pi/2.
ATANH Returns the inverse hyperbolic tangent of a number. Number must be between -1 and 1 (excluding -1 and 1). The inverse hyperbolic tangent is the value whose hyperbolic tangent is number, so ATANH(TANH(number)) equals number.
CEILING Rounds a number up, to the nearest integer or to the nearest unit of significance.
CONVERT Convert an expression to the specified data type.
COS Returns the cosine of the given angle.
COSH Returns the hyperbolic cosine of a number.
COT Return the cotangent of an angle specified in radians.
COTH Return the hyperbolic cotangent of a hyperbolic angle.
CURRENCY Returns the value as a currency data type.
DIVIDE Safe Divide function with ability to handle divide by zero case.
EVEN Returns number rounded up to the nearest even integer. You can use this function for processing items that come in twos. For example, a packing crate accepts rows of one or two items. The crate is full when the number of items, rounded up to the nearest two, matches the crate's capacity.
EXP Returns e raised to the power of a given number.
FACT Returns the factorial of a number, equal to 1*2*3*...* Number.
FLOOR Rounds a number down, toward zero, to the nearest multiple of significance.
GCD Returns the greatest common divisor of two integers. The greatest common divisor is the largest integer that divides both number1 and number2 without a remainder.
INT Rounds a number down to the nearest integer.
ISO.CEILING Rounds a number up, to the nearest integer or to the nearest multiple of significance.
LCM Returns the least common multiple of integers. The least common multiple is the smallest positive integer that is a multiple of both integer arguments number1, number2. Use LCM to add fractions with different denominators.
LN Returns the natural logarithm of a number.
LOG Returns the logarithm of a number to the base you specify.
LOG10 Returns the base-10 logarithm of a number.
MOD Returns the remainder after a number is divided by a divisor.
MROUND Returns a number rounded to the desired multiple.
ODD Returns number rounded up to the nearest odd integer.
PI Returns the value of π, 3.14159265358979, accurate to 15 digits.
POWER Returns the result of a number raised to a power.
QUOTIENT Returns the integer portion of a division.
RAND Returns a random number greater than or equal to 0 and less than 1, evenly distributed. Random numbers change on recalculation.
RANDBETWEEN Returns a random number between the numbers you specify.
ROUND Rounds a number to a specified number of digits.
ROUNDDOWN Rounds a number down, toward zero.
ROUNDUP Rounds a number up, away from zero.
SIGN Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative.
SIN Returns the sine of the given angle.
SINH Returns the hyperbolic sine of a number.
SQRT Returns the square root of a number.
SQRTPI Returns the square root of (number * pi).
TAN Returns the tangent of the given angle.
TANH Returns the hyperbolic tangent of a number.
TRUNC Truncates a number to an integer by removing the decimal, or fractional, part of the number.

Last update: Jan 31, 2023     » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber,

# Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

# Row Context

This expression is executed in a Row Context. Click to read more.

# Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

# Not recommended

The use of this parameter is not recommended.

# Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

# Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

# Deprecated

This parameter is deprecated and its use is not recommended.

# DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

### Contribute

Want to improve the content of CONVERT? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.