Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

zagzebski
Contributor

Pre aggragation then concatenation

I have to preaggregate about 36 months separately. then bring them all together into one table (the tables have the same formats).

What is the easiest way to concatenate this many tables (ie the best scripting)?

My tables are:

Jan2012YTD

Feb2012YTD

Mar2012YTD

...and so on

Tags (1)
1 Reply
jason_michaelid
Honored Contributor II

Re: Pre aggragation then concatenation

Assuming you know all the tables in advance...:

Data:

LOAD * INLINE [Period];

  For Each i In 'Jan2012','Feb2012','Mar2012'

  CONCATENATE

  LOAD

  '$(i)' AS Period,

  ID,

  FieldA,

  FieldB

  FROM

  D:\Scrap\LoopConcat.xlsx

  (ooxml, embedded labels, table is $(i));

  Next;

I have used an example where each table is a sheet in an Excel workbook so you'll need to adjust for your data source.

Hope this helps,

Jason

Community Browser