Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

Please help with my function!

Hi guys,

I have a table as shown:

Salesrep Date  Customer  Item  Checked

  QQ         1-1         001          A          1

  QQ         1-1        001          B          0

  QQ         1-2        002          A          0

  QQ          1-3        002          B          1


For each salesrep, I want to show the number of visit with nothing checked in this 3-day period with each customer. The result for QQ should be like:

Customer  Count

     001          0

     002          1


My function is like:

SUM(IF(Aggr(SUM(Checked), Date&Customer)=0,1,0))


But it shows nothing at all. Please help! Thanks in advance!

1 Solution

Accepted Solutions
sasiparupudi1
Master III
Master III

SUM(IF(Aggr(SUM(Checked), Date,Customer)=0,1,0))

View solution in original post

3 Replies
sunny_talwar

What is the logic behind the output?

wanyunyang
Creator III
Creator III
Author

Customer 001 was only visited once (1-1), during this visit, A is checked, not blank visit. So blank visit count for customer 001=0.

Customer 002 was visited twice (1-2, 1-3). On 1-2, nothing is checked, one blank visit. On 1-3, B is checked, not blank visit. So blank visit count for customer 002=1.

sasiparupudi1
Master III
Master III

SUM(IF(Aggr(SUM(Checked), Date,Customer)=0,1,0))