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: 
HelenMai
Contributor
Contributor

How to load multi files with have the same data content but there's only one column header is different from each other

Hi everybody,

I'm new to Qlik. My case is that i have around 200 files which have the same data format. However the first column header of these files are different from each other. This leads to problem of loading these table.

Is there any solution for this issue.

Thank you in advance for spending your time on my question.

Labels (1)
2 Replies
jochem_zw
Partner Ambassador
Partner Ambassador

Try to do a load inline first to create the table, and after that do a Concatenate of all the 200 files to this inline table.

So something like:

Data:

Load * Inline [RB]; (RB is a field which exists in your files.......)

Concatenate(Data)

Load * From [lib://Data/Files*. (i don't know what files and filenames......)

 

marcus_sommer

Similar to the most simple wildcard-load is to place the wildcard-logic within a filelist() loop which means instead of using:

load * from [path/*.ext] (fileformat);

you applies:

for each file in filelist('path/*.ext')
   let v = subfield('$(file)', '/', -1);
   load * from [$(file)] (fileformat);
next

which means instead of using an implicitly loop an explicitly one is taken and the benefit is hinted in the bold line - any part from full-path might be extracted and/or file-functions and/or any pre-loads in n if-loops are checked and assigned to variables which define all/certain field-names or filters or whatever or might be used to branch in different load-statements - means it's much more flexible.

Beside this your sources are crosstables which are usually better transformed into normal records, see:

The Crosstable Load - Qlik Community - 1468083