Please note javascript is required for full website functionality.

Blog

Power Pivot Principles: The A to Z of DAX Functions – ATAN

21 September 2021

In our long-established Power Pivot Principles articles, we are starting a new series on the A to Z of Data Analysis eXpression (DAX) functions. This week it’s ATAN without colour …

The ATAN function

This function returns the principal value of the arctangent (inverse tangent) of a number (which is not the same as the reciprocal of the tangent). This needs some explanation. Consider a right-angled triangle:

Using the age-old mathematics mnemonic SOHCAHTOA, we get:

  • sin x = opposite / longest side (hypotenuse) = O/H
  • cos x = adjacent / hypotenuse = A/H
  • tan x = opposite / adjacent = O/A
  • arctan y = tan-1 y is the angle whose tangent is y.

This may be charted as follows:

The arctangent is the angle whose tangent is number.  The returned angle is given in radians in the range (-pi/2) to (pi/2).

The syntax is very simple:

=ATAN (number)

It has only one argument:

  • number: the tangent of the angle you want.

Please see my example below:

If you want to convert the result from radians to degrees, simply multiply it by 180/PI () or use the DEGREES function.

The example is shown below:

Again, this is straightforward.

Come back next week for our next post on Power Pivot in the Blog section. In the meantime, please remember we have training in Power Pivot which you can find out more about here. If you wish to catch up on past articles in the meantime, you can find all of our Past Power Pivot blogs here.

Newsletter