Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator II
Creator II

Compare fields from multiple tables

I have tables as shown (First row is table name)

Limited
ID

 

Full Table
ID

 

Alternate Table
ID2

 

I need to check if ID2 has any matching values in Full Table 'ID' and if it does, then check if ID2 matches with any Limited table 'ID'

In simple case, 

if(Alternate Table ID2 = Full Table ID, then check

if(Alternate Table ID2= Limited 'ID', then 'Yes','No') in the script. 

How do I achieve this in the script?

Labels (1)
1 Solution

Accepted Solutions
jwjackso
Specialist II
Specialist II

If you are adding this Yes/No flag to the [Alternate Table].

mapLimitedID:

mapping

load ID,

          '1' as IDFlag

Resident [Limited];

 

mapFullTableID:

mapping

load ID,

         '1' as IDFlag

Resident [Full Table];

 

[Alternate Table]:

load ID2

         If(ApplyMap('mapFullTableID',ID2,'0') = '1',

         If(ApplyMap('mapLimitedID',ID2,'0') - '1','YES','No'),'No')

From AlternateTableSource;

 

View solution in original post

2 Replies
jwjackso
Specialist II
Specialist II

If you are adding this Yes/No flag to the [Alternate Table].

mapLimitedID:

mapping

load ID,

          '1' as IDFlag

Resident [Limited];

 

mapFullTableID:

mapping

load ID,

         '1' as IDFlag

Resident [Full Table];

 

[Alternate Table]:

load ID2

         If(ApplyMap('mapFullTableID',ID2,'0') = '1',

         If(ApplyMap('mapLimitedID',ID2,'0') - '1','YES','No'),'No')

From AlternateTableSource;

 

View solution in original post

qlikwiz123
Creator II
Creator II
Author

Thank You