Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

hkg_qlik
Not applicable

Compare tables and add Flag

Hi,

I need to compare two tables based on MEMBERID. If the MEMBERID match I have to add a flag Yes and if the MEMBERID don't match up its No.

The base table is MailingList table and I have to compare it with the Member table.

MailingList:

MEMBERID

ADDRESS

STATE

COUNTY

EMAIL

I have to add flag in the MailingList table. (Flag: Yes/No)

Member:

MEMBERID

ADDRESS

STATE

COUNTY

EMAIL

Thanks,

H

1 Solution

Accepted Solutions
jason_michaelid
Not applicable

Re: Compare tables and add Flag

Yes - you need to do exactly as I said.  See attached.

Jason

4 Replies
jason_michaelid
Not applicable

Re: Compare tables and add Flag

Map_Member:

MAPPING LOAD

MEMBERID

,'Yes'

From Member....;

MailingList:

LOAD

*

,ApplyMap('Map_Member',MEMBERID,'No') AS Flag

From Mailinglist...;

Hope this helps,

Jason

hkg_qlik
Not applicable

Re: Compare tables and add Flag

The Mailinglist table has only selected MEMBERID where as the Member table contains the entire list and so I want the result that only include and compare the Mailinglist MEMBERID and flag(Yes/No) for the same.

Does that make it clear?

Thanks

H

hkg_qlik
Not applicable

Re: Compare tables and add Flag

I have attached an excel which contains the data and the final output I am looking for.

Thanks,

H

jason_michaelid
Not applicable

Re: Compare tables and add Flag

Yes - you need to do exactly as I said.  See attached.

Jason