Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Loop files and variables

Hi there,

I've seen some some questions about this problem but they don't seem to suit my particular problem. I have the following issue. I have several data sources from separate business units. They all contain the same data fields and they need to be loaded in the same table but all need a qualifier within the table to retrieve the original source. So I have for two business units:



with qualifiers



The script for FUEL looks as shown below

LOAD #OrderID,
SUM(OrderQuantity) AS OrderQuantity
#OrderID, ArgosCompany,OrderDate,CustomerLocation;
LOAD SiteId & DATE(ShiftDate,'DDMMYYYY') AS #OrderID,
AS ArgosCompany,
DATE(ShiftDate, 'DD-MMM-YYYY') AS OrderDate,
SiteId AS CustomerLocation,
IF(Activity = 'Load', LoadedQty, DeliveredQty) AS OrderQuantity
WHERE(MATCH(Source,'DP','DC') AND ((Activity = 'Load' OR Activity = 'Delivery') AND (LoadedQty > 0 OR DeliveredQty > 0)));

How can I incorporate the looping over several files with qualifiers? If this can be done using an Inline load that would work perfect since there is only a limited number of business units but using an xls could also work. Thanks in advance!

Cheers Donald

Tags (1)
4 Replies
Not applicable

Loop files and variables


Since you are using Flag column ArgosCompany, don't use qualifier. Go for concatenate.

Apart from this there are filelist() available.




Not applicable

Loop files and variables

Hi Shubhu,

I just figured it out. And indeed the Qualifier is gone now. Thanks for the help!

Not applicable

Loop files and variables

Just one more question. Right now I'm using an inline statement with LET statements and variables for the Filenames. How would I populate a filelist?

Valued Contributor

Loop files and variables

Search for filelist in the Help

there is an example in the for each..next

The easiest is if you can place your infiles in the same directory, and have some wildcard-string that will match all your filenames.

Community Browser