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

How can I do an 'And' selection on this data in QlikView?

I did distinct(CustomerID) for a count of individuals that registered for AM 2012, 2013 and 2014.... but I want to find out who went to ALL three of the meetings, 2012 and 2013 and 2014, instead of just giving me the number of individuals that went to said meetings (or statement):

Untitled.png

When I run a nested select statement sql query of:

select count(distinct CustomerID)

from EventList

where eventtitle  = 'Annual Meeting 2012'

and CustomerID in

(select distinct CustomerID

from EventList

where eventtitle = 'Annual Meeting 2013'

and CustomerID in

(select distinct CustomerID

from EventList

where eventtitle = 'Annual Meeting 2014'));

I get 288 distinct individuals that went to ALL THREE events. Does this make sense? If so how would I accomplish this?

Thanks,

Joe

2 Replies
Anonymous
Not applicable
Author

This may require some data model manipulation:

AND-Mode

You can also use the and operator in set analysis to get your result form the selection
And Operator in Set Analysis

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Sum(Aggr(If(Count({<Category ={'Annual Meeting 2012', 'Annual Meeting 2013', 'Annual Meeting 2014'}>} DISTINCT Category) = 3, 1, 0), CustomerID))

Hope this helps you.

Regards,

Jagan.