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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Or
MVP
MVP

Event recurrence over time in script

Dear all,

I am looking for the best way to deal with event recurrence over time in QV script, particularly for use in exception highlighting such as customers with repeat late payments, multiple shipments to the same address in a short time span, etc.

Example:

Event TypeEvent Date
AJAN-01-2014
AJAN-02-2014
BJAN-04-2014
AJAN-04-2014
BJAN-05-2014
AJAN-05-2014
BJAN-06-2014
BJAN-08-2014

In the above example, I might be looking for any events that recurred on back to back days, in which case I would expect the results to be A (twice - 01/02 and 04/05) and B (also twice - 04/05 and 05/06).

Alternatively, I might be looking for three recurrences in three (or fewer) days, in which case I would expect only B (04/05/06).

I can probably get this done by loading sub-tables with just the relevant events and using one-at-a-time inter-record functions (peek at each record and figure out if each matches the clause(s)), but this seems like it wouldn't be a very clean of effective approach.

Can anyone suggest a better way of getting this done?

Thanks in advance,

Or

P.S. I get the feeling this has been covered but I can't seem to find the right search terms - feel free to point me at existing threads if the topic has been covered.

0 Replies