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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
balawinner
Contributor
Contributor

Could not apply intersection operation using set analysis

Hi,

I have a specific business requirement to find the intersection for the below tables.

Person_Table:

Person_id, First_name, Last_Name

1,A,B

2,B,C

3,R,T

4,B,H

Event_Table:

Event_id,Event_Name,Event_city

100,Event_1,X

101,Event_2,X

102,Event_3,X

103,Event_4,X

Event_Attendance_Table:

Event_id,Person_id

100,1

100,2

100,3

100,4

101,1

101,2

I need to find the list of people who has attended both events (i.e Event_id : 100 and 101 respectively). I tried a lot using set analysis intersection operation. Please find the list of commands i gave in expressions

Eg:

count({$*$1}Event_code) /*** Assuming Event#100 is selected in $ and Event#101 is selected in $1 ****/

count({$<Event_code *= {101} > }Event_code ) /*** Assuming Event# 100 and 101 selected in multi box *****/

count({ BK01 * BK02 } Event_code) /*** Assuming Event#100 is selected in BK01 and Event#101 is selected in BK02 ****/

None of the above expressions are seems to be working for me. Please help with your inputs.

1 Reply
vgutkovsky
Master II
Master II

Well, do you want a list or do you want a count? I'm also assuming you have some people that did not attend either event, or some events that you don't care about. For count of these 2 events, try this: count({<Event_id={100,101}>} Person_id)

Regards,