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: 
seband_fredes
Contributor II
Contributor II

Subtract two fields values from two different tables

Hi everyone, I've two tables:

T1:

seband_fredes_0-1602091455120.png

 

T2:

seband_fredes_1-1602091494943.png

 

I need to apply an JOIN and subtract Cash fields value between T1 and T2. The join Table's result is:

seband_fredes_2-1602091651527.png

 

Any idea?.

 

Thans for all, blessings

Labels (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

Something like below

T1Temp:
load 
 Eq
 ,Region
 ,Cash as Casht1
from T1Source;

left join(T1Temp)
load 
 Eq
 ,Region
 ,Cash as CashT2
from T2Source;


load  Eq
 ,Region
 ,Casht1-CashT2 as Cash
resident T1Temp;

drop table T1Temp;

View solution in original post

1 Reply
dplr-rn
Partner - Master III
Partner - Master III

Something like below

T1Temp:
load 
 Eq
 ,Region
 ,Cash as Casht1
from T1Source;

left join(T1Temp)
load 
 Eq
 ,Region
 ,Cash as CashT2
from T2Source;


load  Eq
 ,Region
 ,Casht1-CashT2 as Cash
resident T1Temp;

drop table T1Temp;