Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

qlikhans
Contributor

combining data files

Every month I load receive 4 files with the same structure:

LOAD Bookyear,

     Ledger,

     Bookdate,

     Debit,

     Credit

FROM

[Ledger 201101.csv]

(txt, codepage is 1252, embedded labels, delimiter is ';', msq);

I append to the load: MONTH(Bookdate) as Bookmonth,

1. How can I avoid that every month the line MONTH(Bookdate) as Bookmonth must be added. Is it possible to arrange that in 1 line which is valid for the whole QV-file

2. suggestions for a smart method of adding a new month to the previous ones?

4 Replies
Employee
Employee

combining data files

Not sure I understood what you are doing currently and in what way that is not working for you. Could you please provide a sample QVW of your script, and some additional details on the problem you observe.

erich_shiino
Honored Contributor

combining data files

Hi

I'm not sure if I understood either.

Maybe you just need a script like this:

LOAD Bookyear,

      Ledger,

      Bookdate,

month(Bookdate) as Bookmonth,

      Debit,

      Credit

FROM

[Ledger 201*.csv]

(txt, codepage is 1252, embedded labels, delimiter is ';', msq);

With the *, you can read all the files with similar names in the folder and create a field for all of them.

Hope this helps,

Erich

qlikhans
Contributor

combining data files

Hi Tony,

I think the suggestion Erich did combines my two questions into one solution. I will be testing that first.

thank you for your reaction

Kind regards

Hans

qlikhans
Contributor

combining data files

Hi Tony

I will test your suggestion. It makes sense.

Will come back to you.

Kind regards

Hans

Community Browser