Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two columns DateEntered and DateProcessed. I need to join these two dates to calendar date. How can I do this in script. Please see below as I have this in tables
TblTemp:
LOAD
ID,
Date(DateEntered,'DD/MM/YYYY') as DateEntered,
Date(DateProcessed,'DD/MM/YYYY') as DateProcessed
FROM
[Table.qvd]
(qvd);
TblTemp1:
LOAD *,
IF(ID = PREVIOUS (ID),1,0) as Flag1
RESIDENT
TblTemp
ORDER BY ID ASC,DateEntered ASC;
Tbl:
LOAD *,
IF(ID = PREVIOUS (ID) AND Order <> Previous(Order) , DateEntered-PREVIOUS(DateEntered1),' ') as CycleTime
RESIDENT
TblTemp1;
DROP TABLE TblTemp;
DROP TABLE TblTemp1;
LEFT JOIN (Tbl)
LOAD
ID,
MAX(DateEntered) as MaxDateEntered
RESIDENT
Tbl
GROUP BY ID
ORDER BY ID,DateEntered ;
LEFT JOIN (Tbl)
LOAD
ID,
EnteredBy as Member
RESIDENT TblIssue
WHERE DateDateEntered1 = MaxDateEntered;
Calendar:
LOAD Date
Date_TS,
Today,
Week,
Year,
Text(Month) as Month,
ApplyMap('SortMap',Text(Month)) as MonthSort,
Day,
WeekDay,
Quarter,
MonthYear,
WeekYear,
CurYTDFlag,
LastYTDFlag,
FiscalYear,
FiscalYearStart,
FiscalWeek,
FiscalWeekSerial,
FiscalQuarter
FROM
[Calendar.qvd]
(qvd);
Please can anyone suggest me as I tried to get this but not seems using correct.
This blog post may help: Why You sometimes should Load a Master Table several times
You need 2 calendars one for each date ...
This blog post may help: Why You sometimes should Load a Master Table several times
check for canonical dates.
http://community.qlik.com/blogs/qlikviewdesignblog/2014/02/17/canonical-date
Thanks. I tried two calendars but it is not working. How to get this by joining above script? Please help
and also when I am creating two calendars it is getting synthetic keys. Please help
Thanks. I tried this but seems not getting to use with the data which I have. Can please help me.
Thanks. I confused earlier. But this working exactly.