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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
New-Qlik
Creator III
Creator III

load data till previous two week

Hi,

I want to load data from database for last week

Table

select

Date,  ---------is in yyyy:mm:dd hh:mm format

Sales,Name

from ABC;

I tried

1.select Date,  Sales,Name  from ABC

where Date >= max(Date) -14

its not wokring

2. Let vmaxdate= max(date)

load

Date,Sales, NAme

resident table

where Date >= $(vmaxdate) -14

3.

. Let vmaxdate= peek(date)

load

Date,Sales, NAme

resident table

where Date >= $(vmaxdate) -14

Please suggest where I am going wrong

8 Replies
sunny_talwar

Have you made sure that your date is read correctly by QlikView?

Get the Dates Right

Why don’t my dates work?

New-Qlik
Creator III
Creator III
Author

I have used Date(Floor(Date ))  function to convert it

puttemans
Specialist
Specialist

You could try

WHERE Date > Num(Today()-8)

Not applicable

and you added a line like

TRACE $(vmaxdate) -14

To see what the end value is... I am not sure - 14 is the way forward... generally this is done where the date is represented as a number and not an actual day.

New-Qlik
Creator III
Creator III
Author

Thanks but I ant use today()

have to do max(date) i.e. last date -14

Not applicable

did you have any luck?

New-Qlik
Creator III
Creator III
Author

No not yet

Not applicable

Did you add Trace into the loading of the data so that you could see what the value was which was being used?

That will appear on the reload screen