Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

SET Value evaluation inside a table

I created a short script with variables and Inline table created as shown below.

LET Var4= 10 ;

LET Var5 = 20;

LET Var6 = (Var4)*(Var5) ;

LET Var7 = $(Var4)*$(Var5) ;

SET Var8 = $(Var4)*$(Var5);

InlineTable:

LOAD * INLINE [

    Name, Varcols

    Var4, $(Var4)

    Var5, $(Var5)

    Var6, $(Var6)

    Var7, $(Var7)

    Var8, $(Var8)

  

];

When I view the table all Variables are evaluated except var8. What should I do to show Var8 = 200 in the table view on the interface. Thanks for help.

2 Replies
MVP
MVP

Re: SET Value evaluation inside a table

Either use a LET statement as for Var7 or Evaluate():

InlineTable:

LOAD *, Evaluate(Varcols) as Test  INLINE [

    Name, Varcols

    Var4, $(Var4)

    Var5, $(Var5)

    Var6, $(Var6)

    Var7, $(Var7)

    Var8, $(Var8)

  

];

Not applicable

Re: SET Value evaluation inside a table

Simply beautiful. I had not known about EVALUATE function until today. This especially useful when you have to create variables using SET command instead of LET command. Thanks a bunch Mr. Stefan Wuhl.

Community Browser