Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a little problem with a counting function.
I try to count the number of customers but only when the number of recorded actions is greater than 2 and the place = 'x'
| Customer | place | Actions |
|---|---|---|
| A | x | f |
| A | x | g |
| A | x | h |
| A | z | i |
| B | x | f |
| B | x | g |
| B | x | h |
| C | z | k |
| C | z | l |
| C | x | i |
| D | x | j |
in the the table above I would like to count the number of customers where:
- place different from x
- number of actions is greater than 2
So here the result should be 2.
My problem is that I know how to count with conditions
count(distinct if(
place = 'x',
, Customer) )
but I cannot add a calculation as a condition.
May be this
Count(DISTINCT {<Customer = {"=Count(DISTINCT {<place = {'x'}>} Actions) > 2"}, place = {'x'}>} Customer)
May be this
Count(DISTINCT {<Customer = {"=Count(DISTINCT {<place = {'x'}>} Actions) > 2"}, place = {'x'}>} Customer)
Seriously thank you !!
this is exactly the solution.