Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

When to use = in expression

Hi,

I want to know when to start the expression with =?

Sometimes if the expression if not giving required results, developers simply add = and then it starts working. Is there is thum rule when it needs to be used?

what I have observed is if you want to return the value stored in the variable then you need to give =$(variable)...not giving = returns the expression itself (without evaluating the result). Can you please guide on this?

Regards,

Omnu

3 Replies
SunilChauhan
Champion
Champion

when you define using Let keyword

id automatically take equal to

i mean it will calculate expression after variable in let

and when use set Keyword is will not calculate i.e not use equal

ex:

Let a=1+2  results in 3

set a=1+2 results in 1+2

but when you use

=$(a)  IT WILL RESULT IN 3


HOPE THISHELPS

Sunil Chauhan
its_anandrjs

Hi,

When using a variable for text replacement in the script or in an expression, the following syntax is used:

$( variablename )

And for assigning the value to any variable we used

Let vYear = $(CurrentYear);

and if using like this

Set X = $(MUL(3,7)); // returns '3*7' in X

Let X =  $(MUL(3,7)); // returns 21 in X

Hope this helps

Thanks & Regards

Nicole-Smith