Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
IN our current project i have to build one scenerio in qlikview script :
When our loading date = today() than i have to pull the data for arrival date from today() to last 3 days like today()-1,today()-2,today()-3,
and want to set a flag for the same.
You need to provide more information about where you are loading from. Are you loading from a csv, excel file, database etc. What is the name of the data field, or are the files date stamped, etc, etc.
Without that information, any answer that I give you can never be better than a guess.
IF(Date >= $(vLoadingDate) , 'X',' ') as flagLastThreeDays
Hi ,
Previously i have loaded the code accordingly :
LOAD
ID,
Arrive_date,
book_date,
departure_date,
if(departure_date=today(),1,0) as flag_today,
if(departure_date=date(today()-11,'DD/MM/YYYY'),1,0) as flag_remind
resident guest;
Now as per current scenerio i have to change my loading mechanism as per below :
(1) if departure_date =today() and weekday=Monday THEN i have to ick last 3 days data like today()-1,today()-2,TOday()-3..............for other days i have to pick one day older data like today()-1........
and have to maintain the flag also.....................
Hi ,
Previously i have loaded the code accordingly :
LOAD
ID,
Arrive_date,
book_date,
departure_date,
if(departure_date=today(),1,0) as flag_today,
if(departure_date=date(today()-11,'DD/MM/YYYY'),1,0) as flag_remind
resident guest;
Now as per current scenerio i have to change my loading mechanism as per below :
(1) if departure_date =today() and weekday=Monday THEN i have to ick last 3 days data like today()-1,today()-2,TOday()-3..............for other days i have to pick one day older data like today()-1........
and have to maintain the flag also.....................
May be like this..
LET vDate = num(today())-3;
if WeekDay(Today())='Mon' then
Table:
Load Fields from Source.qvd (qvd) where YourDateField > $(vDate);
ELSE
Table:
Load Fields from Source.qvd (qvd) where YourDateField > Today()-1;
ENDIF
Hi Vir,
Create the variables :
1) For Today() - vToday=Today()
2) For last 3 days - vLast3= Today()-3
Then to go document properties---> select trigger----> in first box (Document Event Triggers) select OnOpen--->Click on Add action-->click on Add ---> select External--->set variable--ok
--Put the Arrive_date in variable without Equal to sign(=) and put the variable vLast3 in value. then -->ok
Hope this willl help
Regards,
Mahamed.