Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
rsingh43
Contributor

Last 24 hours

Hi All,

I am trying to only include results where the date is equal to or greater than today and minus last 24 hours. The clause I have added does not seem to be working, can someone please help?

The format of 'Date' is: DD/MM/YYYY hh:mm:ss

LOAD

    OrderID as OID1,

    Date

FROM [lib://OnTrack QVD's (corpbh_qlikadmin)/OrderLegsPlus.qvd]

(qvd)

where DATE(Timestamp(PODDate)) >= Today() - 1;


Thank you in advance.

2 Replies
Highlighted
undergrinder
Valued Contributor II

Re: Last 24 hours

Hi Raman,

the script seems fine. Do you get any error message or just get empty dataset?

Is there column with name PODDate? - when you get error.

Are you sure this method suits you requirements? I mean the day substraction is not equal to 24hour minus,

if the minus 24 hours is important then try compare twotimestamps:

Where Timestamp(PODDate) >= timestamp(now()-1);


G.


Highlighted
giovanneb
Contributor II

Re: Last 24 hours

Hi, try this,

LOAD

    OrderID as OID1,

    Date

FROM [lib://OnTrack QVD's (corpbh_qlikadmin)/OrderLegsPlus.qvd]

(qvd)

Where Timestamp(PODDate) >= Timestamp(ReloadTime() -1);

Reguards