Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
tan_chungkam
Contributor

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
Highlighted
agni_gold
Valued Contributor III

Re: Left Join and Concatenate

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

Highlighted
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.

Highlighted

Re: Left Join and Concatenate

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

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)