Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

tan_chungkam
New Contributor III

Left Join and Concatenate

I have 4 tables:

Table1:

MainOrder,

SalesAmount

Table2:

MainOrder,

BuildingType,

Cost

Table3:

MainOrder,

BuildingType,

Cost

Table4:

MainOrder,

BuildingType,

Cost

Tables consist all the mainorder from table2 to table4.

How could I combine these table into 1 table?

3 Replies
agni_gold
Valued Contributor

Re: Left Join and Concatenate

Go for Concatenate, and for data filtration purpose you can create one flag for each table while concatenating

undergrinder
Valued Contributor II

Re: Left Join and Concatenate

Hi Chung,

I assume the MainOrder in every table is distinct, so I reccommend the following logic:

table_tmp:

Load

MainOrder,

BuildingType,

Cost,

null() as SalesAmount

From table1;

Load

MainOrder,

BuildingType,

Cost,

null() as SalesAmount

From table2;

Load

MainOrder,

null() as Cost

SalesAmount

From table3;

table_final:

Load

MainOrder,

BuildingType,

Cost,

Sum(SalesAmount)

resident table_tmp

group by

MainOrder,

BuildingType,

Cost;

So concatenate all tables, as Agnivesh Kumar suggested, and create a sum of SalesAmount to filter out the possible duplicates.

G.

Re: Left Join and Concatenate

These tables do concatenate default. Just load and see in Model Viewer. Are there any Synthetic Keys formed?