Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i've this problem.
i want to load 2 file from excel in qlik.
They have the same structure (except for 1 variable N_OF_PERSON), because they are database at different date.
The first excel (DATE 20121231) doesn't have N_OF_PERSON, the second excel (DATE 20130131) contain N_OF_PERSON.
I want to recreate the same structure and create a blank (or zero) variable as N_OF_PERSON at 20121231
I try with:
Load *,
if([DATE]<20130131, 0, [N_OF_PERSON]) as [N_OF_PERSON]
From .....
It doesn't work, because at DATE 20121231 qlik could not find N_OF_PERSON.
How can i solve my problem?
Thank you
M
Hi,
you should avoid the load *, you could have two different load, one for each excel.
Like this:
Load * from ...excelfile_with_all_fields...;
Load *, 0 as N_OF_PERSON from ...excelfile_missing_one_field...;
Hi,
do two loads, one for every Excel:
Table:
LOAD
Field1,
Field2,
...,
0 as N_OF_PERSON
FROM DATE_20121231.xls (biff, embedded labels, table is Sheet1$);
LOAD
Field1,
Field2,
...,
N_OF_PERSON
FROM DATE_20130131.xls (biff, embedded labels, table is Sheet1$);
Hope this helps!