GROUPPREDICTIVEWINDOWS

Syntax

GROUPPREDICTIVEWINDOWS(<stringdatenumber>; <stringdatenumber>; <stringdatenumber>; <date>; <number>)

Description

This function assigns IDs to events. It does that based on an event that defines the center of a time-based window (center-event) and all events in that window get assigned the ID of the center-event. It returns a two-element list for each event within the window: the timestamp of that event and the ID of the windows center event.

This is a group series function.

Example

Given the following raw data:

GroupNameEventDate
1aAug 1, 2014
2bAug 2, 2014
3cAug 3, 2014
4dAug 4, 2014
5eAug 5, 2014

Create a new worksheet and use the GROUPBY function with the constant "1" to make a single group.

GROUPBY(1)

Next use the GROUPPREDICTIVEWINDOWS function to create a two-element list for each event within a specified window. The two elements are the date used to create the OrderBy and the Window ID. This example creates a three day window from the specified center event "c" using the value 259200000 milliseconds. 

Events = #RawData!Event
Window center event = "c" 
Window ID = #RawData!GroupName
OrderBy = #Rawdata!Date
Window size in MS =  259200000

 Ensure that values of the string data type are entered with quotation marks.

GROUPPREDICTIVEWINDOWS(#RawData!Event;"c";"#RawData!GroupName;#RawData!Date;259200000)
GROUPBY_ConstantWindow
1[Aug 2, 2014, 3]
1[ Aug 3, 2014, 3]
1[ Aug 4, 2014, 3]