Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to know the number of people that have a common A and B as Flags, each person can have multiple As and/or multiple Bs (and also he can have As without B's and vice versa). This table shows some the data:
PersonID | Flag | Field1 | Field2 | Field3
12 | A |
12 | A |
13 | B |
14 | B |
15 | A |
15 | B |
16 | B |
17 | A |
12 | B |
12 | A |
The result of the count should be 2 because 12 and 15 are the only personID that have records with Flag A and B.
How to obtain this?
maybe this :
=count({<PersonID = p ({1<Flag = {'A'}>}) * p ({1<Flag = {'B'}>}) >}DISTINCT PersonID)
maybe this :
=count({<PersonID = p ({1<Flag = {'A'}>}) * p ({1<Flag = {'B'}>}) >}DISTINCT PersonID)
Thanks! it worked