Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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, each row is a visit record:

Date  Customer  Item  Checked

1-1          001          A          1

1-1          001          B          0

1-2          001          A          0

1-2          002          A          0

1-3          002          B          1


I want to count the number of visit records with nothing checked each day with each customer. The result should be like:

Date  Customer  Count

1-1          001          0

1-2          001          1

1-2          002          1

1-3          002          0



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!

2 Replies
sunny_talwar

May be this

Sum(Aggr(If(Sum(Checked) = 0, 1, 0), Date, Customer)

or just this since you already have Date and Customer as your dimensions

If(Sum(Checked) = 0, 1, 0)

wanyunyang
Creator III
Creator III
Author

Sorry, I refined my description here:

Please help with my function!

Thanks for help!