Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikhans
Creator
Creator

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
ToniKautto
Employee
Employee

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.

erichshiino
Partner - Master
Partner - Master

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
Creator
Creator
Author

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
Creator
Creator
Author

Hi Tony

I will test your suggestion. It makes sense.

Will come back to you.

Kind regards

Hans