# ATANDAX Function (Math and Trig)

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.

## Syntax

ATAN ( <Number> )
Parameter Attributes Description
Number

The tangent of the angle you want.

## Return values

Scalar A single decimal value.

## Remarks

To express the arctangent in degrees, multiply the result by 180/PI( ) or use the DEGREES function.

## Examples

```--  SIN, COS, ASIN, ACOS, TAN, ATAN, COT, ACOT are the
--  standard trigonometrical functions.
--
--  Where required, the arguments are specified in radians.
DEFINE
VAR Vals = GENERATESERIES ( -3 * PI () + 0.001, 3 * PI (), PI () / 4 )

EVALUATE
Vals,
"Value (nπ)",
VAR ImproperQuartersOfPi = ROUND ( ABS ( [Value] / PI () * 4 ), 0 )
VAR WholePis = ROUNDDOWN ( ImproperQuartersOfPi / 4, 0 )
VAR ProperQuartersOfPi = MOD ( ImproperQuartersOfPi, 4 )
RETURN
IF ( ROUND ( [Value], 0 ) < 0, "-" )
& IF ( WholePis <> 0 && ImproperQuartersOfPi <> 4, WholePis )
& IF ( ProperQuartersOfPi <> 0, UNICHAR ( 187 + ProperQuartersOfPi ) )
& IF ( ImproperQuartersOfPi = 0, "0", "π" ),
"SIN", SIN ( [Value] ),
"ASIN", ASIN ( SIN ( [Value] ) ),
"COS", COS ( [Value] ),
"ACOS", ACOS ( COS ( [Value] ) ),
"TAN", TAN ( [Value] ),
"ATAN", ATAN ( TAN ( [Value] ) ),
"COT", COT ( [Value] ),
"ACOT", ACOT ( COT ( [Value] ) )
)
```
Value Value (nπ) SIN ASIN COS ACOS TAN ATAN COT ACOT
-9.42 -3π -0.00 -0.00 -1.00 3.14 0.00 0.00 1,000.00 0.00
-8.64 -2¾π -0.71 -0.79 -0.71 2.36 1.00 0.79 1.00 0.79
-7.85 -2½π -1.00 -1.57 0.00 1.57 -1,000.00 -1.57 -0.00 1.57
-7.07 -2¼π -0.71 -0.78 0.71 0.78 -1.00 -0.78 -1.00 2.36
-6.28 -2π 0.00 0.00 1.00 0.00 0.00 0.00 1,000.00 0.00
-5.50 -1¾π 0.71 0.79 0.71 0.79 1.00 0.79 1.00 0.79
-4.71 -1½π 1.00 1.57 -0.00 1.57 -1,000.00 -1.57 -0.00 1.57
-3.93 -1¼π 0.71 0.78 -0.71 2.36 -1.00 -0.78 -1.00 2.36
-3.14 -0.00 -0.00 -1.00 3.14 0.00 0.00 1,000.00 0.00
-2.36 -¾π -0.71 -0.79 -0.71 2.36 1.00 0.79 1.00 0.79
-1.57 -½π -1.00 -1.57 0.00 1.57 -1,000.00 -1.57 -0.00 1.57
-0.78 -¼π -0.71 -0.78 0.71 0.78 -1.00 -0.78 -1.00 2.36
0.00 0 0.00 0.00 1.00 0.00 0.00 0.00 1,000.00 0.00
0.79 ¼π 0.71 0.79 0.71 0.79 1.00 0.79 1.00 0.79
1.57 ½π 1.00 1.57 -0.00 1.57 -1,000.00 -1.57 -0.00 1.57
2.36 ¾π 0.71 0.78 -0.71 2.36 -1.00 -0.78 -1.00 2.36
3.14 π -0.00 -0.00 -1.00 3.14 0.00 0.00 1,000.00 0.00
3.93 1¼π -0.71 -0.79 -0.71 2.36 1.00 0.79 1.00 0.79
4.71 1½π -1.00 -1.57 0.00 1.57 -1,000.00 -1.57 -0.00 1.57
5.50 1¾π -0.71 -0.78 0.71 0.78 -1.00 -0.78 -1.00 2.36
6.28 0.00 0.00 1.00 0.00 0.00 0.00 1,000.00 0.00
7.07 2¼π 0.71 0.79 0.71 0.79 1.00 0.79 1.00 0.79
7.85 2½π 1.00 1.57 -0.00 1.57 -1,000.00 -1.57 -0.00 1.57
8.64 2¾π 0.71 0.78 -0.71 2.36 -1.00 -0.78 -1.00 2.36

Last update: Jul 12, 2024     » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber

Microsoft documentation: https://docs.microsoft.com/en-us/dax/atan-function-dax

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

# 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 ATAN? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.