Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
josephinetedesc
Creator III
Creator III

Set Analysis - AND operator on one dimension

Hi All

The rows of information are shown below:

What I would like to know is how do I get the number of Persons who have Activity A and Activity B.

There should only be 5 persons but I do not!

=Count({<Activity = e({<Activity = {'A','B'}>})>} DISTINCT Person)

this gives me 10

CampusPersonActivity
North1A
North1B
North1C
South2A
South2B
South2D
East3A
East3B
East3C
West4A
West4B
West4D
SouthEast5A
SouthEast5B
SouthEast5C
North6C
North7D
North8C
North9D
South10C
South11B
South12A
South13B
South14A
South15B

Thank you

Jo

6 Replies
swuehl
MVP
MVP

Try

=Count({<Person = p({<Activity = {'A'}>}) *p({<Activity = {'B'}>}) >} DISTINCT Person)

Gysbert_Wassenaar

Count({<Person=P({<Activity={'B'}>}Person),Activity={'A'}>}DISTINCT Person)


talk is cheap, supply exceeds demand
josephinetedesc
Creator III
Creator III
Author

this works

josephinetedesc
Creator III
Creator III
Author

this works too

josephinetedesc
Creator III
Creator III
Author

Thank you both very much I will now look at the p and I have read about the * for intesection. 

Jo

maxgro
MVP
MVP

=Count({<Person={"=count({$ <Activity={A,B}>} distinct Activity)=2"}>} DISTINCT Person)