Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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.

haymarketpaul
Not applicable

Filtering Duplicate Emails

Hello

I have 2 separate lists of email addresses (online & bulletin)

Lets say for online i have:

     a@a.com

     b@b.com

     c@c.com

     d@d.com

and for bulletin i have:

     c@c.com

     d@d.com

     e@e.com

     f@f.com

i need to be able to select email addresses that are either:

1.     only online email addresses

2.     only bulletin email addresses

3.     email addresses that appear in both online AND bulletin lists

Not sure of the best way to handle this in the LOAD script to then display and be able to select either of these scenarios?

Tags (1)
1 Solution

Accepted Solutions
swuehl
Not applicable

Re: Filtering Duplicate Emails

I would suggest that you concatenate both lists, and create a new field to filter the origin, maybe using something like:

INPUT:

LOAD *, 'Online' as Type INLINE [

email

a@a.com

b@b.com

c@c.com

d@d.com

];

LOAD *, 'Bulletin' as Type INLINE [

email

c@c.com

d@d.com

e@e.com

f@f.com

];

RESULT:

NOCONCATENATE LOAD email, if(minstring(Type)=maxstring(Type), only(Type), 'Both') as Type resident INPUT group by email;

drop table INPUT;

corrected script to label first load correctly

2 Replies
swuehl
Not applicable

Re: Filtering Duplicate Emails

I would suggest that you concatenate both lists, and create a new field to filter the origin, maybe using something like:

INPUT:

LOAD *, 'Online' as Type INLINE [

email

a@a.com

b@b.com

c@c.com

d@d.com

];

LOAD *, 'Bulletin' as Type INLINE [

email

c@c.com

d@d.com

e@e.com

f@f.com

];

RESULT:

NOCONCATENATE LOAD email, if(minstring(Type)=maxstring(Type), only(Type), 'Both') as Type resident INPUT group by email;

drop table INPUT;

corrected script to label first load correctly

haymarketpaul
Not applicable

Re: Filtering Duplicate Emails

Works perfectly Thanks

was missing this crucial bit...very clever.

if(minstring(Type)=maxstring(Type), only(Type), 'Both') as Type