Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello people, I've read some topics about linking dates. Now I want to do something more 'advanced'. I obtained a Qlikview example of the basics. It looks like this:
In order to create the Link table, this script is used:
Link:
LOAD
ID
,CreatedDate as Date
,'Created' as DateType
RESIDENT Table1
;
CONCATENATE (Link)
LOAD
ID
,DepartureDate as Date
,'Departure' as DateType
RESIDENT Table2
;
CONCATENATE (Link)
LOAD
OtherID
,OtherDate as Date
,'Other' as DateType
RESIDENT OtherTable
;
Okay from here all fine! Now I want to something like this:
Is it possible to make the Link table obtain the DepartureDate from Table3, since it is now not directly connected? If so how would I script that?
Help is much appreciated!
pls share ur qvw,tht's helps to answer ur query quickly.
I suppose that you have to use a 2 way calculation
Tmp:
noconcatenate
load *
resident Table2;
left join(Tmp)
load *
resident Table3;
Link:
left join(Link)
ID,
DepartureDate as LinKDepartureDate
resdient Tmp;
drop table Tmp;
Rename of DepartureDate is necessary to avoid syntetic keys
OR
you drop TABLE3 (as there is no further information if there is nothing else in there)
Hi thx for the input,
I see what you are trying to do with the Tmp table, however when applying the part under Link I will get an extra field in the Link table, LinkDeparture. Basically what Im trying to achieve is that the link table should get the same output with different table setups.
The picture below shows the content of the Link Table, the right one is how it should be. The left one is with the other table setup.
I can get the Departure values in it, but not related to the ID numbers..
When I say:
CONCATENATE (Link)
LOAD
ID
RESIDENT Table2
It will of course just add 3 lines with the ID numbers, but not related to the DepartureDate..
(Ive attached the qvws if that is helpful for anyone)