Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Left Joins - reference from table I am joining to

Hi - is it possible to reference from the table I am joining to when using a left join

In the example, UNIQUE_MPAN_PER_ICE is a field within TABLE1

LEFT JOIN (TABLE1)
LOAD TEAMS,
VALUE_PER_CUSTOMER/UNIQUE_MPAN_PER_ICE
RESIDENT  VPC;

DROP TABLE VPC;


Thanks

Nandy

2 Replies
marcus_sommer

This won't work directly within join - after joining you could it calculate. Perhaps it is better for this to use a mapping with applymap() - for examples and explanations see the manual.

- Marcus

gandalfgray
Specialist II
Specialist II

Hi

To do calculations on a table do a RIGHT JOIN on itself.

If I alter your example a bit it will be like this:

LEFT JOIN (TABLE1)
LOAD TEAMS,
VALUE_PER_CUSTOMER
RESIDENT  VPC;

DROP TABLE VPC;



RIGHT JOIN (TABLE1)
LOAD *,
VALUE_PER_CUSTOMER/UNIQUE_MPAN_PER_ICE As CalculatedField
RESIDENT  TABLE1;