Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ashmitp869
Creator II
Creator II

Scripting help needed

Hi All,

Please kindly assist me in the scripting -

I have file with date field which I have to load in qvd -

ashmitp869_0-1648683139810.png

 

I am tryin to write incremental load script like below , but its not solving my purpose - 

HCW:
LOAD
Date(Date#(left(FileName(),6),'DDMMYY'),'D/M/YYYY') as _Date,
if(rowno()=1, 1,0) as count_active,
if(rowno()=2, 1,0) as count_total_isolation,
if(rowno()=3, 1,0) as count_total_community,
Nursing,
Medical,
"Allied Health" as AH,
"Scientific/Technical" as scientific,
"Admin/ Corporate" as admin_corporate,
"Other",
"Total",
FileName() as HCW.FileName
FROM [lib://280322.xlsx]
(ooxml, embedded labels, table is [LHD Summary]);


STORE HCW INTO [lib://HCWFulldata.qvd] (qvd);

Last_Updated_date:
load max(date(_Date),'D/M/YYYY') as MaxDate
FROM [lib://HCWFulldata.qvd] (qvd);

Let vLast_Updated_date=Peek('MaxDate',0,'Last_Updated_date');


NoConcatenate
HCW:
LOAD
Date(Date#(left(FileName(),6),'DDMMYY'),'D/M/YYYY') as _Date,
if(rowno()=1, 1,0) as count_active,
if(rowno()=2, 1,0) as count_total_isolation,
if(rowno()=3, 1,0) as count_total_community,
Nursing,
Medical,
"Allied Health" as AH,
"Scientific/Technical" as scientific,
"Admin/ Corporate" as admin_corporate,
"Other",
"Total",
FileName() as HCW.FileName
FROM [lib://290322.xlsx]
(ooxml, embedded labels, table is [LHD Summary]) where Date(Date#(left(FileName(),6),'DDMMYY'),'D/M/YYYY') > $(vLast_Updated_date);

 

Concatenate
Load
* from [lib://HCWFulldata.qvd] (qvd);

STORE HCW INTO [lib://HCWFulldata.qvd] (qvd);
drop table HCW;

 

 

 

1 Reply
Bill_Britt
Former Employee
Former Employee

HI,

Do all the files have the same-named fields? If so, you can try to do 

Load * from *.xlsx

 

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.