Discussion Board for collaboration related to Qlik Education.
I am new to QlikView and am stuck with an issue in the script side.
I need to create a variable and store a value, only to be used by the next LOAD statement.
Here is how it goes.
LOAD fields from FACT.qvd;
The issue is that the $(CYEAR) is replaced by FACT.FISCAL_YEAR when the application is refreshed. And it pops up an error message that the field is not found.
Thanks for your help..
Go to Solution.
For load value from any table use Peek() and for storing use LET rather than SET
LET CYEAR = Peek('FACT.FISCAL_YEAR',-1,'FACT');
Note:- And what value you need in the variable CYEAR i suppose max year if the order of table is ascending then you get max year value, otherwise provide sample file.
Try LET instead of SET ...
let me know
LET worked in loading the application with no errors but the data was not as expected.
PEEK worked perfectly.Thanks for your help.
Worked like a charm..