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: 
prat1507
Specialist
Specialist

Matching field value from another table

Hi

Lets say I have two tables as below;

Table1:

Col1

A

B

C

Table2:

Col2, Col3

A,10

A,20

B,30

The above two tables are not linked. Please don't make any changes. I want to show a straight table like below;

Col1 Sum.Col3

A     30

B     30

C     0

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

3 Replies
PabloTrevisan
Partner - Creator II
Partner - Creator II

Hi Pratyush,

qvex.jpg

execute with this script ..

table1:

LOAD * INLINE [

Col1

A

B

C

];

table2:

noconcatenate LOAD * INLINE[

Col2, Col3

A,10

A,20

B,30

];

MAP_Col:

Mapping LOAD Col2,

Sum(Col3)

resident table2

group by Col2;

Table:

LOAD Col1,

ApplyMap('MAP_Col',Col1,'0') as Col3

resident table1;

drop table table1;

drop table table2;

vishsaggi
Champion III
Champion III

Try this?

Capture.PNG

prat1507
Specialist
Specialist
Author

Hi, I already tried this yesterday night, tried this again today and it worked!! !! Thanks man!!