Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Pico
Partner - Contributor III
Partner - Contributor III

check if value exists in a specific filed of another table

Hi All,

I have two tabels, one with people anag. and one with Devices anag. They are linked with the field ID_KEY

I would like to have a field to see if a person does have or not a Device.

First I load The Devices. Then I load the People Anag: at this point I would like to do something like 

IF(Devices.ID_KEY Exists in People:ID_KEY, 'YES' , 'NO' ) as Flag

What should I use?

Since the number of users and devices is huge, I cannot use the solution proposed Here.

Thank you very much

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

@Pico  try below

Device_anag:
LOAD ID_Key_Device
     ....
FROM DeviceAnagTable;

People_Anag:
LOAD ID_Key_People
      ...,
     if(Exists(ID_Key_Device,ID_Key_People),'Y','N') as Flag
FROM PeopleAnagTable;

View solution in original post

2 Replies
Kushal_Chawda

@Pico  try below

Device_anag:
LOAD ID_Key_Device
     ....
FROM DeviceAnagTable;

People_Anag:
LOAD ID_Key_People
      ...,
     if(Exists(ID_Key_Device,ID_Key_People),'Y','N') as Flag
FROM PeopleAnagTable;
Pico
Partner - Contributor III
Partner - Contributor III
Author

Very nice, thank you!