Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to link calendar date to two dates?


Hi,

I have a calendar date as Date. I need to link this calendar Date with StartDate and EndDate

Below is the sample data

I have values in StartDate

29/09/2014 08:46:40
29/09/2014 08:47:24
29/09/2014 08:49:13
29/09/2014 08:50:03
29/09/2014 08:51:42
29/09/2014 08:53:39

EndDate have values

29/09/2014 08:47:28
29/09/2014 08:48:37
29/09/2014 08:54:57
29/09/2014 09:10:20
29/09/2014 08:52:28
29/09/2014 09:24:19

How can I link calendar Date to both StartDate and EndDate. Please can anyone suggest me

Thanks.

4 Replies
Not applicable
Author

Can anyone suggest me please.

its_anandrjs

Hi,

If you load your table this ways

T1:
Load * Inline [
StartDate
29/09/2014 08:46:40
29/09/2014 08:47:24
29/09/2014 08:49:13
29/09/2014 08:50:03
29/09/2014 08:51:42
29/09/2014 08:53:39
]
;

T2:
LOAD * Inline [
EndDate
29/09/2014 08:47:28
29/09/2014 08:48:37
29/09/2014 08:54:57
29/09/2014 09:10:20
29/09/2014 08:52:28
29/09/2014 09:24:19
]
;


CommonDate:
LOAD
StartDate,
StartDate as Date,
'Tab1'
as TabFLag
Resident T1;

Concatenate(CommonDate)
LOAD
EndDate,
EndDate as Date,
'Tab2'
as TabFLag
Resident T2;


Then you get single table with Startdate,Enddate and Date


Regards

Anand

Not applicable
Author

Thanks. I just added sample dates. But in source file I have dates from 2013 to 2014. How can I change the script please suggest me.

its_anandrjs

Same script is worked there also whatever data is there like for any years it create common field and you can use date field for master calendar creation also, and check if they have same format.

Regards,

Anand