Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can we take caluculated value from two tables using resident Load

Hi Friends,

I have two values like x from A table and y from B table.

I want to create a Table by taking difference of x an y.

Thanks
pavan

6 Replies
Anonymous
Not applicable
Author

assuming there is a common field you can define:

tmptest:

noconcatenate load

key,

x

resident A

left join (tmptest)

load

key,

y

resident B

test:

noconcatenate load

key,

x,

y,

x-y as diff

resident tmptest

drop table tmptest

hope that helps

amit_saini
Master III
Master III

Pavan,

This can be possible with Resident load, please see below yon do something like that :

Resident load is like this.

TableA:

select columna, value, columnb

from table1;

TableB:

select columna, sum(value)

resident TableA

group by columna;

Thanks,

AS

Not applicable
Author

Thanks Rudolf

Getting error after resident A. not able to use left join.

Temptest:

NoConcatenate Load

key,

PremiumOGIS Resident OGIS

left

jagan
Luminary Alumni
Luminary Alumni

Hi Pavan,

Try like this

Temp:

load

key,

x

resident A;

left join (Temp)

load

key,

y

resident B;

Data:

load

key,

x,

y,

x-y as diff

resident Temp;

drop table Temp

Hope this helps you.

Regards,

Jagan.

MarcoWedel

please post sample data of both tables

mrooney
Contributor III
Contributor III

Hi pavan,

I suggest to make a mpaping from one table and then use an applymap to the sencond.

Table_A:

Load key,

     x

From.......;

Map_Table:

Mapping Load key,

     x

Resident Table_A;

Table_B:

Load key,

     (applymap('Map_Table',key,Null()) - y) as Diference

    

From.....;

Hope helps.