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: 
fosoto
Contributor
Contributor

Join tables of different dimensions

I want to merge to tables where 1 table has less dimensions than the other. The idea is to repeat the data from the smaller table to fill the extra dimensions from the larger table. Example:

Table 1

Field 1Field 2Field 3DateData1
X1Y1Aene-191
X1Y1Bene-192
X1Y1Cene-193
X1Y2Aene-194
X1Y2Bene-195
X1Y2Cene-196
X2Y1Aene-197
X2Y1Bene-198
X2Y1Cene-199
X2Y2Aene-1910
X2Y2Bene-1911
X2Y2Cene-1912

 

Table 2

Field 3DateData2
Aene-1913
Bene-1914
Cene-1915

 

Expected result

Field 1Field 2Field 3DateData1Data2
X1Y1Aene-19113
X1Y1Bene-19214
X1Y1Cene-19315
X1Y2Aene-19413
X1Y2Bene-19514
X1Y2Cene-19615
X2Y1Aene-19713
X2Y1Bene-19814
X2Y1Cene-19915
X2Y2Aene-191013
X2Y2Bene-191114
X2Y2Cene-191215

 

When using Join and concatenate i dont get the "filled table" instead it appends the data from table 2 at the end filling the fileds 1 & 2 form table 1 with "-"

Thanks!

Labels (1)
3 Replies
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

join seems to work good.

Maybe try to use trim on key fields

agigliotti
Partner - Champion
Partner - Champion

you should use somethings as below in script:
FinalTable:
load * from Table1;
left join
load * from Table2;
fosoto
Contributor
Contributor
Author

That was the first approach, but i dont get the data from table 2 to merge into table 1 (repeated across the aditional dimentions table 1 has)