Power Pivot Principles: The A to Z of DAX Functions – COS
2 August 2022
In our long-established Power Pivot Principles articles, we continue our series on the A to Z of Data Analysis eXpression (DAX) functions. This week, we look at COS.
The COS function
Not to be confused with cos lettuce, this function returns the cosine of the given angle. For those of you with more important things to do during your trigonometry lessons (like sleeping), that denotes the ratio of the adjacent side of a triangle divided by its hypotenuse (subject to sign considerations), viz.
The COS function employs the following syntax to operate:
The COS function has the following arguments:
- number: this is required and represents the angle in radians for which you want the cosine.
It should be further noted that if the angle is in degrees, you should multiply the angle by PI()/180 or else use the RADIANS function to convert the angle to radians.
Please see my example below:
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.