Transform Tab in Query Editor: Trigonometry functions available in the query editor of Power Bl: Lesson-7 P-10

Transform Tab in Query Editor: Trigonometry functions available in the query editor of Power Bl: Lesson-7 P-10

The trigonometry functions  in Power BI's query editor

There isn't actually a dedicated "trigonometry" section within Power BI's query editor. However, you cannot perform basic trigonometric calculations using DAX formulas within the Custom Columns option of the Transform tab.

How to get it:

process:

  1. Access custom columns: Go to the Transform tab and select "Add Column" -> "Custom Column".
  2. Name your column: Give your new column a descriptive name.
  3. Enter a DAX formula: In the formula bar, type your desired trigonometric expression using the DAX functions. Here are some common trigonometric functions in DAX:
  • Sine (SIN): Calculates the sine of an angle in radians.
  • Cosine (COS): Calculates the cosine of an angle in radians.
  • Tangent (TAN): Calculates the tangent of an angle in radians.
  • Degrees to Radians (RADIANS): Converts degrees to radians (important because DAX functions use radians).
  • Radians to degrees (degrees): Converts radians to degrees (if needed to display results).

Example formula (sine of temperature column in degrees):

Syntax:

= SIN(RADIANS([TemperatureColumn]))

key points:

  • Make sure your data is in numeric form (for example, degrees for trigonometric calculations).
  • DAX uses radians by default, so convert degrees to radians using the RADIANS function before applying the trigonometric functions.
  • If you want to display the final result in degrees, consider using the DEGREES function.
  • Explore additional DAX trigonometric functions such as arctangent (ATAN), arcsine (ASIN) and arccosine (ACOS) for more complex calculations.

Overall:

DAX formulas within the Custom Columns option in Power BI's Query Editor provide the ability to perform basic trigonometric calculations on your data. Remember to consider data types, unit conversions (degrees to radians), and explore the available DAX functions for more advanced trigonometric manipulations.


Lab Work:

Trigonometry Functions Menu

1:- Sine:

  • Return the sine of the numbers in selected column
    • Transform -->Trigonometry --> Sine

2:- Cosine:

  • Return the Cosine of the numbers in selected column
    • Transform -->Trigonometry --> Cosine

3:- Tangent:

  • Return the Tan of the numbers in selected column
    • Transform -->Trigonometry --> Tangent

4:- Arcsine:

  • Return the Arcsine of the numbers in selected column
    • Transform -->Trigonometry --> Arcsine

 

5:- Arccosine:

  • Return the Arccosine of the numbers in selected column
    • Transform -->Trigonometry --> Arccosine

 

6:- Arctangent

  • Return the Arctangent of the numbers in selected column
    • Transform -->Trigonometry --> Arctangent

Thanks 


Microsoft Power BI Table of Contents: Lessons Index