Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I normally load directly from an SQL server and have been adding fields using a Case statement in the script. For example:
Datatable:
Select
Term
,CASE
WHEN Term is null then 'No Term'
WHEN Term <=12 then '0-12'
WHEN Term >=13 and Term <=24 then '13-24'
WHEN Term >=25 and Term <=36 then '25-36'
ELSE '37+'
End as term_band
I would like to create the same type of field when loading from an excel file.
Thanks,
Paul
Your QlikView load script will be as follows:
LOAD Term,
If (IsNull(Term),'No Term',
If (Term <= 12,'0-12',
If (Term <= 24,'13-24',
If (Term <= 36,'25-36','37+')))) as term_band,
....
FROM TestExcelLoad.xlsx
(ooxml, embedded labels, table is Sheet1);
I tested it and it works.
Your QlikView load script will be as follows:
LOAD Term,
If (IsNull(Term),'No Term',
If (Term <= 12,'0-12',
If (Term <= 24,'13-24',
If (Term <= 36,'25-36','37+')))) as term_band,
....
FROM TestExcelLoad.xlsx
(ooxml, embedded labels, table is Sheet1);
I tested it and it works.