Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to load 50 + QVD and few QVD's do not have one field 'FINAL_SALE' due to which - when I try to load all QVD's using wildcard load I get "Field Not Found" error.
Is there a way to concatenate QVD's which do not have 'FINAL_SALE' field with new field 'FINAL_SALE' and null values for that field.
OrderDetails:
Load
ORDNUM,
ORDLIN,
DISPATCH_DATE,
FINAL_SALE
FINAL_SALEFROM [lib://QlikShare/UC_QLIK_ORDERDETAILS*.qvd]
(qvd) WHERE ([ORDQTY]>0) ;
Thanks in advance!
Yash
This may work.
OrderDetails:
// create empty table as concatenation target
LOAD
0 as ORDNUM,
0 as ORDLIN,
0 as DISPATCH_DATE,
0 as FINAL_SALE
0 as FINAL_SALE
FROM AUTOGENERATE 0; //<--zero rows will be added to this table
//force concatenation
Concatenate(OrderDetails)
Load
ORDNUM,
ORDLIN,
DISPATCH_DATE,
FINAL_SALE
FINAL_SALEFROM [lib://QlikShare/UC_QLIK_ORDERDETAILS*.qvd]
(qvd) WHERE ([ORDQTY]>0);
This logic was found elsewhere on the community here:
https://community.qlik.com/t5/Qlik-Sense-App-Development/Loading-Multiple-QVDs-with-wildcard/m-p/330...
There are other methods that involve creating more complex looping logic, but I would try this simple method first.
QlikTom's suggestion helped me out in this situation, however there was a small typo with the code on the AutoGenerate.
There shouldn't be a "FROM" and the "0" should be in brackets, i.e.:
LOAD
0 as ORDNUM,
0 as ORDLIN,
0 as DISPATCH_DATE,
0 as FINAL_SALE
0 as FINAL_SALE
AUTOGENERATE (0);