Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi friends
what is the meaning of let and set in the qlikview??
and point out the differences in them in detail?
Hi,
Let: Calculates the expression assigned to it and sets the expression result to the variable.
Set: Assigns the value(or expression which is after the equal sign) as it is without compute.
Example:
Set vVar=2+3; //vVar has the expression 2+3 as value we have to compute it using $(vVar) which returns 5
Let vVar=2+3;//vVar has the computed value 5
Hope it helps
Celambarasan
Hi,
Let: Calculates the expression assigned to it and sets the expression result to the variable.
Set: Assigns the value(or expression which is after the equal sign) as it is without compute.
Example:
Set vVar=2+3; //vVar has the expression 2+3 as value we have to compute it using $(vVar) which returns 5
Let vVar=2+3;//vVar has the computed value 5
Hope it helps
Celambarasan
Hello,
there is a pretty good explanation in the Qlikview Help:
The let statement has been created as a complement to the set statement, used for defining script variables. The let statement, in opposition to the set statement, evaluates the expression on the right side of the ' =' before it is assigned to the variable.
The word let may be omitted, but the statement then becomes a control statement. Such a statement without the keyword let must be contained within a single script row and may be terminated either with a semicolon or end-of-line.
Examples:
Set x=3+4;
Let y=3+4
z=$(y)+1;
$(x) will be evaluated as ' 3+4 '
$(y) will be evaluated as ' 7 '
$(z) will be evaluated as ' 8 '
Hi,
SET just assigns the value as string whatever you give.
LET evaluates the expresion and assigns it to the variable.
LET vString = 'Qlik' & 'View' (Now vString has QlikView)
LET vNumber = 2 + 3 (Now vNumber has5)
Hope this helps you
Regards,
Jagan.
thnx
k thanks but what happen when i write
let a=b+7?
can any one say it...
thanks
Praveen
thanx
Set x=3+4;
Let y=$(y)*3
z=$(y)
So my question is
z will be 3+4*3 = 15 or (3+4) *3 = 21
I realize this post is a bit dated, however there was a really good post in the Qlik Design Blog addressing this very question in great detail which I personally found quite helpful: The Magic of Variables
Cheers!