Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

Concatenation two tables from one data source

I have one table that I am trying to concatenate to itself basically with just one additional manually defined field.  Here is the table structure:

Table1:

LOAD MonthNum,

          Account,

          Cost,

          '2016' AS Year

FROM

(ooxml, embedded labels, table is Sheet1);

I then want to add data from another file (Table2.xlsx) that has the same fields except for the Year.  What is the best way to do this?  I would like to use a QVD if possible.

1 Solution

Accepted Solutions
bgerchikov
Partner - Creator III
Partner - Creator III

Hi Cliff,

You can use either Join command or Concatenate:

Table1:

LOAD MonthNum,

          Account,

          Cost,

          '2016' AS Year

FROM

(ooxml, embedded labels, table is Sheet1);

Store Table1 into Table1.qvd();

Join(Table1)

Load *

FROM
[Table1.qvd]
(
qvd)

Join(Table1)

LOAD MonthNum,

          Account,

          Cost

FROM

(ooxml, embedded labels, table is Sheet1);

View solution in original post

2 Replies
bgerchikov
Partner - Creator III
Partner - Creator III

Hi Cliff,

You can use either Join command or Concatenate:

Table1:

LOAD MonthNum,

          Account,

          Cost,

          '2016' AS Year

FROM

(ooxml, embedded labels, table is Sheet1);

Store Table1 into Table1.qvd();

Join(Table1)

Load *

FROM
[Table1.qvd]
(
qvd)

Join(Table1)

LOAD MonthNum,

          Account,

          Cost

FROM

(ooxml, embedded labels, table is Sheet1);

maxgro
MVP
MVP

You can add the Table2 rows to Table1 using a concatenate

concatenate (Table1)

LOAD MonthNum,

          Account,

          Cost

FROM

(ooxml, embedded labels, table is Sheet1);