Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Tags (1)
6 Replies
hrlinder
Honored Contributor

Re: Can we take caluculated value from two tables using resident Load

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
Honored Contributor III

Re: Can we take caluculated value from two tables using resident Load

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

Re: Can we take caluculated value from two tables using resident Load

Thanks Rudolf

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

Temptest:

NoConcatenate Load

key,

PremiumOGIS Resident OGIS

left

MVP
MVP

Re: Can we take caluculated value from two tables using resident Load

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.

Re: Can we take caluculated value from two tables using resident Load

please post sample data of both tables

mrooney
New Contributor III

Re: Can we take caluculated value from two tables using resident Load

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.

Community Browser