Trigonometric and Hyperbolic Functions in Qlik Sense

1. Objective

In our last Qlik Sense tutorial, we discussed Logical Functions in Qlik Sense. Today we use the trigonometric and hyperbolic functions to apply trigonometric operations on the data values used in Qlik Sense apps. Moreover, we will first introduce you to all the important  Qlik Sense trigonometric and hyperbolic functions and then gain a better understanding of them by learning how to use them in with your data in your script codes. Also, the expressions of these functions represent the angle measures in radians by x which is always a real number.

So, let’s start Qlik Sense Trigonometric and Hyperbolic Functions tutorial.

Qlik Sense Trigonometric and Hyperbolic Functions

Trigonometric and Hyperbolic Functions in Qlik Sense

Have a look at Qlik Sense  Null functions

2. Qlik Sense Trigonometric and Hyperbolic Functions

i. cos() function

It returns the cosine value of x, which is a number between -1 and 1.

The syntax of cos() function:

cos(x)

ii. acos() function

It returns inverse cosine of x, where the value of x must fulfil the condition -1≤x≥1 and it gives a result between 0 and π.

The syntax of acos() function in Qlik Sense:

acos(x)

iii. sin() function

It returns the sine of x, where the resultant value will be between -1 and 1.

Do you know about Qlik Sense Mapping Functions

The syntax of sin():

sin(x)

iv. asin() function

It returns the inverse sign of x, where the condition -1≤x≤1 must be fulfilled for the value of x and the result will be a number between – π/2 and π/2.

The syntax of asin() function:

asin(x)

v. tan() function

This function returns the tangent of x, where the result is a real number.

The syntax of tan() function in Qlik Sense:

tan(x)

vi. atan() function

This function returns the inverse tangent of x, where a result is a number between – π/2 and π/2.

Let’s revise Qlik Sense Line chart

The syntax of atan() function in Qlik Sense:

atan(x)

vii. atan2() function

This function returns the angle between the origin and the point represented by the coordinates x and y. It is a two-dimensional generalization of the inverse tangent function where a result is a number between -π and +π.

The syntax of atan2() function:

atan2(y,x)

viii. cosh() function

This function returns the hyperbolic cosine of x, where the result is a real positive number.

The syntax of cosh() function:

cosh(x)

ix. sinh() function

This function returns the hyperbolic sine of x, where a result is a real number.

Let’s discuss Qlik Sense Exponential and Logarithmic Functions

The syntax of sinh() function:

sinh(x)

x. tanh() function

This function returns the hyperbolic tangent of x, where the result is a real number.

The syntax of tanh() function in Qlik Sense:

tanh(x)

xi. Sample code

In the sample code given below, we have first loaded a table named ‘SampleData’ where a field named ‘Value’ has been loaded. In the next table named ‘Results’, we have used all the trigonometric and hyperbolic function that we just learned to want the script to generate a table with the trigonometric and hyperbolic values for the given values.

SampleData:

LOAD * Inline
[Value
0
1];
Results:
Load *,
cos(Value),
acos(Value),
sin(Value),
asin(Value),
tan(Value),
atan(Value),
atan2(Value, Value),
cosh(Value),
sinh(Value),
tanh(Value)
RESIDENT SampleData;
Drop Table SampleData;
cos

(value)

acos

(value)

sin

(value)

asin

(value)

tan

(value)

atan

(value)

atan2

(value,value)

cosh

(value)

sinh

(value)

tanh

(value)

11.570..00000100
0.540..00.841..1.570..1.557..0.785…π/41.543..1.175..0.761..

The results table given below returns the 0 and 1 value for each function.

Let’s revise Qlik Sense Counter functions

So, this was all in Qlik Sense Trigonometric and Hyperbolic functions. Hope you like our explanation.

3. Conclusion

Thus, these were all the important trigonometric and hyperbolic functions used in Qlik Sense for various relevant purposes.

Still, if you have any query regarding Trigonometric and Hyperbolic Functions, ask in the comment tab.

See also – 

Qlik Sense Color Functions

Reference for Qlik Sense

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.