Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
nbazz
Contributor II
Contributor II

Count with conditions

Hello,

My data on Qlik Sense is structured as follows:

 

DateUserAction
2021-09-30AnaA
2021-09-30AnaB
2021-09-30JohnA
2021-09-30MattB

 

I want to count all distinct users who did action A AND ALSO DID action B. Using the normal set analysis {<action={'A','B'}>} it returns to me all those who did action A and all those who did action B, not exclusively those who did both.

 

In the example above, the result of the count distinct should be 1, since Ana is the only one who did action A and action B both.

Labels (1)
1 Reply
stevejoyce
Specialist II
Specialist II

Try this:

count({<User = p({<Action = {'A'} >} User) * p({<Action = {'B'} >} User) > } User)