Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
steve1982
New Contributor II

Combine 3 tables into 1 by Concatenate

Hi,

I am tried concatenate 3 tables into 1 table. The script as below. The output was I only able to get the 1st table content, which the Category is XX.

Final:
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);
Left Join
LOAD
A,
D,
E,
F,
'XX' as Categoty
FROM qvd;

concatenate(Final)
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);
Left Join
LOAD
A,
D,
E,
F,
'YY' as Categoty
FROM qvd;


concatenate(Final)
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);
Left Join
LOAD
A,
D,
E,
F,
'ZZ' as Categoty
FROM qvd;

Thanks 

Steve

1 Solution

Accepted Solutions

Re: Combine 3 tables into 1 by Concatenate

My bad, try this

Final:
NoConcatenate LOAD * Resident Final_Temp1; Concatenate (Final) LOAD * Resident Final_Temp2; Concatenate (Final) LOAD * Resident Final_Temp3; DROP Tables Final_Temp1, Final_Temp2, Final_Temp3;

 

View solution in original post

4 Replies

Re: Combine 3 tables into 1 by Concatenate

Try this

Final_Temp1:
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);

Left Join (Final_Temp1)
LOAD
A,
D,
E,
F,
'XX' as Category
FROM qvd;

Final_Temp2:
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);

Left Join (Final_Temp2)
LOAD
A,
D,
E,
F,
'YY' as Category
FROM qvd;


Final_Temp3:
LOAD
A,
B,
C
FROM [lib://AttachedFiles/XXX.xlsx]
(ooxml, embedded labels, table is [Sheet1]);

Left Join (Final_Temp3)
LOAD
A,
D,
E,
F,
'ZZ' as Categoty
FROM qvd;

Final:
LOAD *
Resident Final_Temp1;

Concatenate (Final)
LOAD *
Resident Final_Temp2;

Concatenate (Final)
LOAD *
Resident Final_Temp3;

DROP Tables Final_Temp1, Final_Temp2, Final_Temp3;
steve1982
New Contributor II

Re: Combine 3 tables into 1 by Concatenate

Get the error message Table 'Final' not found on 

Concatenate (Final)

 

Re: Combine 3 tables into 1 by Concatenate

My bad, try this

Final:
NoConcatenate LOAD * Resident Final_Temp1; Concatenate (Final) LOAD * Resident Final_Temp2; Concatenate (Final) LOAD * Resident Final_Temp3; DROP Tables Final_Temp1, Final_Temp2, Final_Temp3;

 

View solution in original post

steve1982
New Contributor II

Re: Combine 3 tables into 1 by Concatenate

Thanks Sunny