Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ciaran_mcgowan
Partner - Creator III
Partner - Creator III

Load multiple files at once (columns vary)

Hi,

I'm looking to load several years worth of Sales data from CSV files into a single table, the only problem is that over the years, new fields have been added so the files containing the data vary a little. When I tried "LOAD * FROM Sales*.csv", Qlikview crashes so I'm assuming that has to do with the extra/missing data.

An example of the first table looks like this (1995):

SaleIDDateShopIDItemID
00101/01/1998S001I001

Where a table from 10 years ago looks like this:

SaleIDDateShopIDShopZoneItemTypeItemID
00101/01/1998S001Z01FoodI001

And the latest table looks like this:

SaleIDDateShopIDShopZoneShopCountryItemTypeItemIDItemCountTotal
00101/01/1998S001Z01UKFoodI00122

These are greatly simplified. The oldest files have 6 columns and the latest ones have 59. Columns have been added over the years to gather more information but no columns have been deleted so the basic information (IDs, etc.) are present in all files.

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

Here it is an example where

2.xlsx , 3 and 4 have different list of fields, to concatenate all I have to use a dummy table with a fake field

Hope it helps

View solution in original post

3 Replies
maxgro
MVP
MVP

try reading the files in a for loop (you can find a lot of post about this)

and concatenating the files

in this way you can discover which one crash

alexandros17
Partner - Champion III
Partner - Champion III

Here it is an example where

2.xlsx , 3 and 4 have different list of fields, to concatenate all I have to use a dummy table with a fake field

Hope it helps

ciaran_mcgowan
Partner - Creator III
Partner - Creator III
Author

Thank you Alessandro, that worked a treat!