Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Quality test - comparing two fields

Hi

I've browsed the forums but couldn't find my answer.

I have a set of data (set a) with Post Codes, and another set of data (set b)  with all UK Post Codes.

I want to quality check that the Post Codes in set a appear in set b, and ideally produce a field called 'PostCodeValid' with the options of either 'Y' or 'N'.

Many Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

MAP:

MAPPING LOAD

     Postcode, 'Y' as F2

FROM AllUKPostcodeTable;

TABLE:

LOAD

     Postcode,

     applymap('MAP',Postcode, 'N') as Valid,

     ..

FROM YourTable;

View solution in original post

3 Replies
swuehl
MVP
MVP

MAP:

MAPPING LOAD

     Postcode, 'Y' as F2

FROM AllUKPostcodeTable;

TABLE:

LOAD

     Postcode,

     applymap('MAP',Postcode, 'N') as Valid,

     ..

FROM YourTable;

alexandros17
Partner - Champion III
Partner - Champion III

If the table with all Post codes is "Tab1" and the other table is Tab2 then, supposing that the post code in both tables is "myPostCode" then

MyTable: noconvìcatenate

Load * resident Tab1;

left join

Load distinct *, 'Y' as flag  resident Tab2;

Now, where you find 'Y' it means that a code from tab2 matches with an identical code in tab1 otherways you have unmatching codes

Hope it helps

Not applicable
Author

Thank you and thanks Alexandros17‌ your method works too.