Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can we concatenate two Crosstables?

Hi ,

I am loading two crosstables as given below.  Is it possible to merge these two cross tables.

MonthlyIndPara:

CrossTable(ParameterMonth, Data, 2)

LOAD

Name,

     Parameters,

     [Jan-2014],

     [Feb-2104],

     [Mar-2014],

     [Apr-2014],

     [May-2014],

     [Jun-2014],

     [Jul-2014],

     [Aug-2014],

     [Sep-2014],

     [Oct-2014],

     [Nov-2104],

     [Dec-2014]

FROM

[RawData.xlsx]

(ooxml, embedded labels, table is Parameters);

MonthlyAttendance:

CrossTable(PresentMonth, PresentDays, 2)

LOAD Team,

     Name,

     [Jan-2014],

     [Feb-2104],

     [Mar-2014],

     [Apr-2014],

     [May-2014],

     [Jun-2014],

     [Jul-2014],

     [Aug-2014],

     [Sep-2014],

     [Oct-2014],

     [Nov-2104],

     [Dec-2014]

FROM

[RawData.xlsx]

(ooxml, embedded labels, table is Attendance);

5 Replies
deepakqlikview_123
Specialist
Specialist

use resident load for both table.

Concatenate both tables and

drop origioal tables.

Thanks

MayilVahanan

Hi

You need to use Resident table in order to concatenate the cross tables. After concatenate, you can able to drop the original tables.

If you have many cross table and need to join with one table, then try like below

// Retrieve the table names
FOR i = 0 to NoOfTables()

  TableList:

  LOAD TableName($(i)) as Tablename AUTOGENERATE 1;

     // here u can specify condition like WHERE WildMatch(TableName($(i)), '*Month*');"

NEXT i


//Join with Sales Table
FOR i = 1 to FieldValueCount('Tablename')

  LET vTable = FieldValue('Tablename', $(i));

  Concatenate(Sales)LOAD * RESIDENT $(vTable);  // Concatenate with sales table

  DROP TABLE $(vTable);

NEXT i

//Drop the unwanted table
DROP TABLE TableList;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

I am new to qlikview.

Can you please show me an example.

deepakqlikview_123
Specialist
Specialist

MonthlyIndPara:

CrossTable(ParameterMonth, Data, 2)

LOAD

Name,

     Parameters,

     [Jan-2014],

     [Feb-2104],

     [Mar-2014],

     [Apr-2014],

     [May-2014],

     [Jun-2014],

     [Jul-2014],

     [Aug-2014],

     [Sep-2014],

     [Oct-2014],

     [Nov-2104],

     [Dec-2014]

FROM

[RawData.xlsx]

(ooxml, embedded labels, table is Parameters);

MonthlyAttendance:

CrossTable(PresentMonth, PresentDays, 2)

LOAD Team,

     Name,

     [Jan-2014],

     [Feb-2104],

     [Mar-2014],

     [Apr-2014],

     [May-2014],

     [Jun-2014],

     [Jul-2014],

     [Aug-2014],

     [Sep-2014],

     [Oct-2014],

     [Nov-2104],

     [Dec-2014]

FROM

[RawData.xlsx]

(ooxml, embedded labels, table is Attendance);

Final:

Load * Resident MonthlyIndPara;

Concatenate(Final)

load * Resident MonthlyAttendance;

Drop Table MonthlyIndPara;

Drop Table MonthlyAttendance;

Thanks

Not applicable
Author

Thanks for your answer.