Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

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
Author

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.