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: 
reporting_neu
Creator III
Creator III

Join between two tables doesn't work

Hi,

I have two tables:

NoConcatenate
TMP1_IA_Statistik:
Load
Part
,Year
,MaVerbr
Resident IA_Statistik
;
 
Part Year MaVerbr
1001 2024 1000
1001 2023 900
1001 2022 700
899 2024 50

 

AND 

NoConcatenate
TMP2_MLL_Movements:
Load
Part
,Year
,AvgOnHand
Resident TMP1_MLL_Movements;
 
Part Year AvgOnHand
1001 2024 89000
1001 2023 79000
1001 2022 49000
899 2024 300

 

I want to append the field "AvgOnHand" from the table "TMP2_MLL_Movements" to the table "TMP1_IA_Statistik". The connection can be established via Part and Year.

I tried it like this:

NoConcatenate
TMP3:
LOAD * RESIDENT TMP2_MLL_Movements;
JOIN LOAD * RESIDENT TMP1_IA_Statistik;
 
I got: 😞
 
Part Year AvgOnHand MaVerbr
1001 2024 1000  
1001 2024   89000
1001 2022 900  
1001 2022   7900

 

Qlik creates its own rows instead of writing the data one after the other.

I need:

Part Year AvgOnHand MaVerbr
1001 2024 1000 89000
1001 2023 900 79000
1001 2022 700 49000
899 2024 50 300

 

Can you help me please?

Labels (3)
1 Solution

Accepted Solutions
VBD
Partner - Creator II
Partner - Creator II

Hello,

Are you sure that your fields Year and Part are in the same format ?

Regards,

 

Valentin Billaud
Next Decision

View solution in original post

3 Replies
VBD
Partner - Creator II
Partner - Creator II

Hello,

Are you sure that your fields Year and Part are in the same format ?

Regards,

 

Valentin Billaud
Next Decision
Qrishna
Master
Master

IA_Statistik:
load *, Part & '|' & Year as %Key;
Load * inline [
Part, Year, MaVerbr
1001,2024,1000
1001,2023,900
1001,2022,700
899, 2024,50
];

left join(IA_Statistik)
//TMP1_MLL_Movements:
load *, Part & '|' & Year as %Key;
Load * inline [
Part,Year,AvgOnHand
1001,2024,89000
1001,2023,79000
1001,2022,49000
899,2024,300
];

2491315 - Append Two fields.PNG

reporting_neu
Creator III
Creator III
Author

That was the problem. I have now used Upper(Text()). This works. Thank you very much!