Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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.