Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
JoaquinLazaro
Partner - Specialist II
Partner - Specialist II

LOAD + IF to other table

Hello:

I've this script

Table1:

LOAD KeyField, Field12, Field13, Field14 ..

Table2:

LOAD KeyField, Field22, Field23, Field24 ..


I need to create a new boolean field  calculated (NewField) on Table2 thats indicates if KeyField is or not in Table1.

I've thought in a mapping table created from resident Table1 and an applymap in Table2 LOAD instruction


Map:

MAPPING

LOAD KeyField, 'Yes' as NewField

Resident Table1


(In Table2 LOAD)  Applymap('Map', KeyField, 'No) as NewField


Is there any easy way, a function or a smart way to do it ?


Thank you

Joaquín

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

Table1:

LOAD KeyField, Field12, Field13, Field14 ..

Table2:

LOAD KeyField, Field22, Field23, Field24 ..,If(Exists(KeyField),'Present','Not P') As Flag...

View solution in original post

3 Replies
anbu1984
Master III
Master III

Table1:

LOAD KeyField, Field12, Field13, Field14 ..

Table2:

LOAD KeyField, Field22, Field23, Field24 ..,If(Exists(KeyField),'Present','Not P') As Flag...

ankitaag
Partner - Creator III
Partner - Creator III

Table1:

LOAD KeyField, Field12, Field13, Field14 ..

Table2:

LOAD KeyField, Field22, Field23, Field24 ,Yes as Flag

where exists (KeyField)

concatenate

Table3:

LOAD KeyField, Field22, Field23, Field24 ,No as Flag

where not exists (KeyField)

JoaquinLazaro
Partner - Specialist II
Partner - Specialist II
Author

Thank you anbu1984 it works fine.