Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replicating countif in Qlikview

I'm trying to replicate a countif I have used in excel as calculated field in a Qlikview table.

The countif is designed to count how many times a customer contacts again within 7 days of that record.

Column A is the customer ID

Column B is the contact date/time

=COUNTIFS(A:A,A2,B:B,">"&B2,B:B,"<" &B2 +7)

Can anybody help replicate this in Qlikview?

2 Replies
Anonymous
Not applicable
Author

Please find attached. You will see a way to do this in script.

Hope it helps.

Marc.

robert_mika
Master III
Master III

Try

=SUM(IF(MODEL='A' AND VIN>'$(vB)'  AND VIN<'$(vB)'+7,1))

where '$(vB)' is a variable

(To create variable

Settings->Variable Overview -->Add