GROUPSESSIONS

Syntax

GROUPSESSIONS(<stringdatenumber>; <stringdatenumber>; <stringdatenumber>; <stringdatenumber>; <stringdatenumber>)

Description

Assigns IDs to events based on session start and session end. All events with the session ID of the start event between start and end event get assigned the ID of the start event.

This is a group series function.

Example

Given the following raw data:

GroupNameEventDate
1AAug 1, 2014
1BAug 2, 2014
2startAug 3, 2014
2AAug 4, 2014
2AAug 5, 2014
2endAug 6, 2014
3BAug 7, 2014
3startAug 8, 2014
3endAug 9, 2014
3AAug 10, 2014

Create a new worksheet and use the GROUPBY function to group by the GroupName column from the raw data.

GROUPBY(#rawdata!GroupName)

COPY the event and date columns for reference.

COPY(#rawdata!Event)
COPY(#rawdata!Date)
GroupNameEventDate
1AAug 1, 2014
1BAug 2, 2014
2startAug 3, 2014
2AAug 4, 2014
2AAug 5, 2014
2endAug 6, 2014
3BAug 7, 2014
3startAug 8, 2014
3endAug 9, 2014
3AAug 10, 2014

Use the GROUPSESSIONS function to create a column that assigns a session ID for each event with the same session ID of the "start" marker between the "start" and "end" markers.

Events = #rawdata!Event
Start event = "start"
End event = "end"
Session ID = #rawdata!GroupName
OrderBy =   #rawdata!Date

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

GROUPSESSIONS(#rawdata!Event;"start";"end";#rawdata!GroupName;#rawdata!Date)
GroupNameEventDateSessionId
1AAug 1, 2014
1BAug 2, 2014
2startAug 3, 20142
2AAug 4, 20142
2AAug 5, 20142
2endAug 6, 20142
3AAug 10, 2014
3BAug 7, 2014
3startAug 8, 20143
3endAug 9, 20143