Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script help repeat records

Hi,

I will try and explain my question as best i can.

I have some source data which is being loaded in to QlikView which contains details of customer contacts, such as customer number, contact date, reason etc.

The purpose of my script is to identify customers that have contacted more than x number of times in a given period (30 days), what i want to do first of all is:

1) Identify contacts where contact date is anywhere between todays date and -30 days.

2) Where a contact date is identified (eg, 29 days ago) i would like the script to look back a further 30 days (from the first identified contact date for each unique customer number) and return any additional contacts for that customer number if the 30 days previous to the most recent contact.

Any help would be appreciated.

Thanks

2 Replies
Not applicable
Author

Anyone?

Not applicable
Author

Hi,

You can create a flag in your script to identify if the contact date is between today and -30 dasy as follows,

if([contact Date]>=Today()-30,1,0)

If the flag value is '1' it means that the customer has contact within last 30 days. With this value, you can further create another flag to check the second condition.

hope this resolves your issue.

cheers Haneesh