Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;
[...]