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

Sum 2 Columns from 2 differents Tables in script

Hi everyone,

 

I need to create a new column which is the sum of 2 columns from 2 differents. But, i need just some values from the column of table 2.

Let me show:

Table1:

LOAD
ID,
Volume_consolidado

Table2:

LOAD
ID,
Volume as Volume_projecao,
Forecast,
"Forecast Ano",
"Forecast Q"

 

I need to sum all values from "Volume_consolidado" (Table1) and Volume_projecao, just with the Forecast = ''2024-Q4''

I hope you guys could help me.

 

Thanks!

Labels (4)
2 Replies
G3S
Creator III
Creator III

you'd need to load both data set into a single table. when loading the data from 'Table 2' a where clause can limit so you are loading only 2024-Q4

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you want to create this new field in the script, you'll need to create a temporary join of lookup of the tables. For suggestions, see https://qlikviewcookbook.com/2020/03/creating-temporary-script-associations/

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com