Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count occurrences

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'

CustomerplaceActions
A

x

f
Axg
Axh
Azi
Bxf
Bxg
Bxh
Czk
Czl
Cxi
Dxj

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.

1 Solution

Accepted Solutions
sunny_talwar

May be this

Count(DISTINCT {<Customer = {"=Count(DISTINCT {<place = {'x'}>} Actions) > 2"}, place = {'x'}>} Customer)


Capture.PNG

View solution in original post

2 Replies
sunny_talwar

May be this

Count(DISTINCT {<Customer = {"=Count(DISTINCT {<place = {'x'}>} Actions) > 2"}, place = {'x'}>} Customer)


Capture.PNG

Not applicable
Author

Seriously thank you !!

this is exactly the solution.