In Tableau, the TAN
function is a number function that returns the tangent of a given angle. It calculates the trigonometric tangent value of an angle expressed in radians.
The syntax for the TAN
function in Tableau is as follows:
TAN(angle)
angle
represents the angle in radians for which you want to calculate the tangent.
Here's an example to illustrate the usage of the TAN
function in Tableau:
Suppose you have a dataset with a column called "Angle" that contains different angle values in radians.
Angle |
---|
0.524 |
1.047 |
1.571 |
2.094 |
To calculate the tangent of each angle in the "Angle" column using the TAN
function, you can create a calculated field in Tableau:
- Right-click on a blank area in the "Data" pane in Tableau.
- Select "Create Calculated Field."
- In the formula editor, enter the following expression:
TAN([Angle])
- Click "OK" to create the calculated field.
The calculated field, which utilizes the TAN
function, will calculate the tangent value of each angle in the "Angle" column.
The resulting dataset will be as follows:
Angle | Tangent |
---|---|
0.524 | 0.577 |
1.047 | 1.732 |
1.571 | Infinity |
2.094 | -1.732 |
In this example, the TAN
function calculates the tangent value for each angle in the "Angle" column. For instance, the angle of 0.524 radians has a tangent value of approximately 0.577, the angle of 1.047 radians has a tangent value of approximately 1.732, the angle of 1.571 radians has a tangent value of infinity (as the tangent of 90 degrees is undefined), and the angle of 2.094 radians has a tangent value of approximately -1.732.
The TAN
function is commonly used in trigonometry and geometry calculations, where the tangent value of an angle is required. It is useful for analyzing slopes, inclines, and angular relationships. By utilizing the TAN
function in Tableau, you can easily incorporate trigonometric calculations into your visualizations and gain insights from your data.
No comments:
Post a Comment
If you have any doubts. Please let me know