Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use Count with Two Criteria as Dimension

HI,

I have data structured like this

RecipientActionValidDate
emailAddress1@noemail.comRECEIVED101/01/2013
emailAddress1@noemail.comOPENED101/01/2013
emailAddress2@noemail.comRECEIVED101/02/2013
emailAddress2@noemail.comRECEIVED102/01/2013
emailAddress2@noemail.comOPENED104/02/2013
emailAddress2@noemail.comCLICKED005/01/2013
emailAddress5@noemail.comRECEIVED005/01/2013

My hope is to make a bar chart that will have the number of emails received (Action=Received & Valid=1) as the Dimension on the X axis and the number of Recipients on the Y axis as the expression,  This way I can see how many people received 1, 2,3...N email. 

I tried this with no luck as the dimension: =count({<Valid={'1'},Action={'RECEIVED'}>} Recipient)

many thanks

1 Solution

Accepted Solutions
maxgro
MVP
MVP

if I understand your question, try this

dimension

aggr(count(if(Valid=1 and Action='RECEIVED', Action)), Recipient)

measure

count(distinct if(Valid=1 and Action='RECEIVED',  Recipient))

View solution in original post

1 Reply
maxgro
MVP
MVP

if I understand your question, try this

dimension

aggr(count(if(Valid=1 and Action='RECEIVED', Action)), Recipient)

measure

count(distinct if(Valid=1 and Action='RECEIVED',  Recipient))