Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show latest 5 min data after each reload in 5 min's ??

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.

6 Replies
vivientexier
Partner - Creator II
Partner - Creator II

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...

;

vivientexier
Partner - Creator II
Partner - Creator II

5/1440 => 5 minutes in numeric format

Not applicable
Author

Thanks Viven, for qiuck responce but can you please explain me bit more last line ??

Thanks in Advance

vivientexier
Partner - Creator II
Partner - Creator II

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

Not applicable
Author

That's Great Vivien,Thanks for your help.

vivientexier
Partner - Creator II
Partner - Creator II

You are welcome. Close these ticket if it answers to your question.