Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to count how many Users do not have Category = C.
With the next example, the answer is 1 (User 2)
User | Category | Option |
---|---|---|
1 | A | 1 |
1 | A | 2 |
1 | A | 3 |
1 | A | 4 |
1 | A | 5 |
1 | A | 6 |
1 | B | 2 |
1 | B | 3 |
1 | B | 4 |
1 | B | 5 |
1 | C | 3 |
1 | C | 4 |
1 | C | 5 |
1 | C | 6 |
2 | A | 1 |
2 | A | 2 |
2 | A | 3 |
2 | A | 4 |
2 | A | 5 |
2 | A | 6 |
2 | B | 2 |
2 | B | 3 |
2 | B | 4 |
2 | B | 5 |
2 | B | 6 |
2 | D | 2 |
2 | D | 3 |
2 | D | 5 |
I used:
count({<Category -= {'C'}>} distinct User)
but the result is: User 1 = 1 and User 2 = 1
Thanks in advance
Hi Deepak, so i get the users that have Category = C (User 1) and need the opposite (User 2)
Addapting your code I did i little change and now it do the correct but maybe there is other better solution.
The syntax i used was:
Count (DISTINCT {<Category-={"C"}>}User)-Count (DISTINCT {<Category={"C"}>}User)
Thanks for your help
hi,
Try the attach application
Deepak
Hi Deepak, so i get the users that have Category = C (User 1) and need the opposite (User 2)
Addapting your code I did i little change and now it do the correct but maybe there is other better solution.
The syntax i used was:
Count (DISTINCT {<Category-={"C"}>}User)-Count (DISTINCT {<Category={"C"}>}User)
Thanks for your help
hi,
Yes you can do it in below way.
Count (DISTINCT {<Category =Category-{"C"}>}User)
Deepak
That way it doesn't work.
I attach file