Access 2 different sources with same data, load one privileged
I got two different sources which both give me a date-field "Projektstart" ( the start date of a project). For usual I receive the data from Source 1, but sometimes it is necessary to take it from Source 2, for example when Source 1 doesn't contain data for a project. In 95% of all cases both sources will contain data, in this case I wan't to receive the data from Source 1, because Source 1 may contain wrong data.
Is there a possibility to allocate to both sources the same field in QLIK and how can I instruct QLIK, to take the data from source 1 favored?
Re: Access 2 different sources with same data, load one privileged
Assuming you have some sort if row ID (lets call it ID) to relate the rows in the two sources, then something like this:
If(Len(T2.Field1) > 0, T2.Field1, T1.Field1) as Field1;
If(Len(T2.Field2) > 0, T2.Field2, T1.Field2) as Field2;
DROP Table T1, T2;
Adapt the field names and FROM sources to your requirements. I am also assuming that you want data from source2, and fill in from source1 if nothing in source2. If its the other way round, swap the statements around in the last LOAD.