Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am new to Qlik and I am trying to find max value of a particular column in all the qvd files in a folder (column name is same). I wrote the code to loop though the folder and to read the max value of the column. Now I want to load the max values into an array after each file qvd file has been read. Can some one help me with this:
This is the code I have written till now:
sub Dates(dummy)
for each file in fileList('$(vQVDRawLocation)'&'\*.qvd')
if FileSize('$(File)') > 0 then
AutoNumberQVDDate:
LOAD DISTINCT QVDDATE
Resident TempTable;
AutoNumber1:
LOAD max(QVDDATE) AS Key
Resident AutoNumberQVDDATE;
let vAutoNumber1 = Peek('Key',0,'AutoNumber1');
end if
next File
end sub
reply
hi you can do like this
this will create one table with Key column and the values from each file
for each file in fileList('$(vQVDRawLocation)'&'\*.qvd')
if FileSize('$(File)') > 0 then
AutoNumberQVDDate:
LOAD max(QVDDATE) AS Key
from [$(file)] (qvd);
end if
next file
Thank you but I just found that one of the files do not have the same column name, so this wont work.