Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Campus | Person | Activity |
North | 1 | A |
North | 1 | B |
North | 1 | C |
South | 2 | A |
South | 2 | B |
South | 2 | D |
East | 3 | A |
East | 3 | B |
East | 3 | C |
West | 4 | A |
West | 4 | B |
West | 4 | D |
SouthEast | 5 | A |
SouthEast | 5 | B |
SouthEast | 5 | C |
North | 6 | C |
North | 7 | D |
North | 8 | C |
North | 9 | D |
South | 10 | C |
South | 11 | B |
South | 12 | A |
South | 13 | B |
South | 14 | A |
South | 15 | B |
Thank you
Jo
Try
=Count({<Person = p({<Activity = {'A'}>}) *p({<Activity = {'B'}>}) >} DISTINCT Person)
Count({<Person=P({<Activity={'B'}>}Person),Activity={'A'}>}DISTINCT Person)
this works
this works too
Thank you both very much I will now look at the p and I have read about the * for intesection.
Jo
=Count({<Person={"=count({$ <Activity={A,B}>} distinct Activity)=2"}>} DISTINCT Person)