Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
constantin_olar
Contributor III

how to create a new field based on two tables

Hello,

 

I have  2 tables and I want to create a new field based on the information from both.

Tab1:

id, site, surname

1, London, Emy

2,Poole,Eny

 

Tab2:

ID, Product, Site

1, Apple,London

2,Apple,Luton

3,Orages,Luton

4,Plumes,London

5,Kiwi,London

 

The 'site' from Tab 1  =  'Site  Tab 2 . 

I want to create a new field in Tab 2 based on this condition:

if(site exists in Tab 2 put Yes else no) how I can do this in Qlikview?

My new table need to looks like this :

Tab3:

ID, Product, Site, Yes/No

1, Apple,London,Yes

2,Apple,Luton,No

3,Orages,Luton,No

4,Plumes,London,Yes

Resident Tab2;

Thanks in advance! 

 

Labels (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: how to create a new field based on two tables

Something like this using the Exists() function:

Tab3:

LOAD *, If(Exists(site, Site), 'Yes', 'No') as [Yes/No]

Resident Tab2;


talk is cheap, supply exceeds demand
1 Reply
MVP & Luminary
MVP & Luminary

Re: how to create a new field based on two tables

Something like this using the Exists() function:

Tab3:

LOAD *, If(Exists(site, Site), 'Yes', 'No') as [Yes/No]

Resident Tab2;


talk is cheap, supply exceeds demand