Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem creating a Variable from Load Script

He Everyone

    I'm new to QlikView and I am struggling with variables, I've the following Script

Script

LastQtrNR:

Load


(Max(Num(Mid(Trim([Period]),3,2))+ (Num(Right(Trim([Period]),1))/10))) As [MaxQtr]

From [..\QlikView\DataSource.qvd](qvd)

Where [Metric] <> 0

;



Let vLastQtr = Num(Peek('[MaxQtr]',1));


Drop Table LastQtrNR;


T:

Load '$(vLastQtr)' As MaxQuarter;


Thing is the result of the first load statement should be "18.1" Which I will convert in FY18 Q1, and store it in vLastQtr, however, I'm not able to verify the result of the variable assignation with the load, and I'm not sure on how to modify the variable value to use it as a filter for other queries

1 Reply
Miguel_Angel_Baeyens

Once you reload the app, you can either create an input box object and add the variable vLastQtr or press Ctrl + Alt + v and see the content of the variable.

You can also add in your script a TRACE function to display in the loading screen the value of the variable:

Let vLastQtr = Num(Peek('[MaxQtr]',1));

TRACE --> $(vLastQtr);

Drop Table LastQtrNR;

[...]