Discussion board where members can get started with Qlik Sense.
I was trying to create a variable using peek() function in Qlik sense Script editor. But no value was assigned to the variable. Can someone please help me here?
let vMaxYear= peek('MaxFY');let vLastYear=$(vMaxYear)-1;
Go to Solution.
Seems you are getting the max value, why can't you use Max() in load script like below
MaxYear:LOAD Max(MaxFY) AS MaxFYFROM[lib://Documents/MaxFY.qvd](qvd);
Peek() always gives you the last value read, if the last value is null then you won't get any value in Peek().
Hope this helps you.
Does a table named MaxYear exist after the script is executed and does the last row of that table contain a value in the field MaxFY?
Thanks for your quick response. Yes, MaxYear table is existed after script execution and also MaxFY has the value.
Does the variable vMaxYear have a value? Can you post the MAXFY.qvd file?
let vMaxYear= peek('MaxFY',-1,'MaxYear');
What us the format of MaxFY field?
How To /Missing Manual(18 articles)