Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Have you made sure that your date is read correctly by QlikView?
I have used Date(Floor(Date )) function to convert it
You could try
WHERE Date > Num(Today()-8)
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.
Thanks but I ant use today()
have to do max(date) i.e. last date -14
did you have any luck?
No not yet
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