Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
maasool
Contributor III
Contributor III

Adding together two columns from different tables

Hello Dear Qlik Community,

I have two tables, with similar structure. Column A contains identical variables in both tables, while columns B and C contain values. I would like to get one table, where values in column B and C are summed together. How to achieve this?

Table 1:
A    B    C
a    1     1
b    1     1

Table 2:
A    B    C
a    2     2
b    2     2

As a result, I would like to get Table 3 and drop Table 1 and table 2:

Table 3:
A     B    C
a     3     3
b     3     3


Best regards,
maasool

1 Solution

Accepted Solutions
phapalesaurabh
Partner - Contributor III
Partner - Contributor III

Hi @maasool ,

First concatenate these 2 tables into one temp table and make aggregation in Final Table.

 

View solution in original post

3 Replies
phapalesaurabh
Partner - Contributor III
Partner - Contributor III

Hi @maasool ,

First concatenate these 2 tables into one temp table and make aggregation in Final Table.

 

JordyWegman
Partner - Master
Partner - Master

Hi Maasool,

Do the following:

Table1:
Load
  *
From [YourSource](qvd);

Concatenate(Table1):
Load
  *
From [YourSource](qvd);

FinalTable:
Load
  A,
  Sum(B),
  Sum(C)
Resident Table1
Group by A;

Drop table Table1;

Jordy

Climber

Work smarter, not harder
maasool
Contributor III
Contributor III
Author

Found a solution, which worked:

Concatenate (Table 1)  LOAD * Resident Table 2;
Drop Table 2;

 

Table3:
NoConcatenate Load
A,
Sum(B) as B,
Sum(C) as C,
resident Table2
group by A;
Drop table Table 2;