Discussion Board for collaboration on QlikView Scripting.
I have following table
DATE([date-added],'DD/MM/YYYY') AS Date
LET vMaxDateTime = Peek('Date',-1,'Transaction');
However the variable is not returning the correct date
It should be returning 29/05/2014 but it keeps returning 26/09/2013
What makes you think the it should be returning 29/05/2014?
Zero denotes first record of the table.
-1 denotes last record of the table
Were the dates sorted when stored in qvd? Are you looking for max date? If so, try like:
Max([date added]) a Maxdate
LET vMaxDateTime = Date(Peek('Date'));
Why don't you display the records sorted by load order to verify the contents of the last record?
If you looked for the max(Date) this could be an alternatively: “Fastest” Method to Read max(field) From a QVD | Qlikview Cookbook.