Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a application which reloads in every 5 mins to show latest data in QlikView. wanted to know after each reload how to show latest 5 min's data.
Hi !
In your scritp, add a variable like :
LET vDate_last_5_minutes = Now() - 5/1440;
Then,
In your script, add a field with a timestamp.
LOAD
field_1
, filed_2
, field_timestamp // Time of creation of the data in your database.
, If(field_timestamp >= $(vDate_last_5_minutes), 1) as Last_5_minutes_data
FROM...
;
5/1440 => 5 minutes in numeric format
Thanks Viven, for qiuck responce but can you please explain me bit more last line ??
Thanks in Advance
Ok, it is easy.
Today is 22/05/2013 but computer use numeric format. For QlikView, today is the day number "41416" (=> Num(Today()).
1 => On day.
41416.5 => 22/05/2013 at noon.
On day contains 1440 minutes. So 5 minutes => 5/1440 => 0.0034722...% of a day
Is it clear for you ?e
That's Great Vivien,Thanks for your help.
You are welcome. Close these ticket if it answers to your question.