Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have following table
Transaction:
LOAD
warehouse,
DATE([date-added],'DD/MM/YYYY') AS Date
FROM
(qvd);
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
Any ideas?
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:
Load
Max([date added]) a Maxdate
From <>;
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.
- Marcus