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: 
Not applicable

Calculated Field using 2 Tables

Hello All,

I am trying to create a calculated field in my script using 2 fields in 2 different tables. I know it's something simple but I would appreciate some help.

1 Reply
Not applicable
Author

I don't know if this will help you but here's a simple example:

test:

LOAD * INLINE [

ARTNBR, NUMBER1

3154, 1000

3154, 857

3169, 455

3169, 3542

]

;

inner join

LOAD * INLINE [

ARTNBR, NUMBER2

3154, 50

3169, 222

];

test2:

LOAD *,

NUMBER1 - NUMBER2 as NUMBER_DIFFERENCE

Resident test;

drop table test;

NUMBER_DIFFERENCE is a calculated field using 2 fields in 2 different tables.  I also attached a qvw for additional help if you need it.

Hope this helps!