01
Write the six source records
Use these six fictional source records: R1 device A code X at minute 0; R2 A X at 3; R3 A X at 7; R4 B X at 2; R5 B X at 4; R6 A Y at 1. Preserve this source list before grouping. The first report anchors each time window, so a report at minute 7 is outside a window beginning at 0 even though it is only four minutes after R2. That choice prevents a chain of nearby reports from extending one group indefinitely. Different rules can be reasonable, but they produce different interpretations of the same list.
02
Apply the anchored window
For the fictional device A and event code X, R1 starts a group and R2 joins it; R3 starts a second group because 7 minus 0 exceeds five. For B and X, R4 and R5 belong together because their timestamps differ by two minutes. R6 has another event code and therefore forms its own group. The result is four groups containing six reports: two groups of two and two groups of one. This is a grouping result only. Whether any group is a genuine incident requires evidence and judgement outside this counting exercise.
03
Keep a reproducible worksheet
Use columns for group identifier, device, code, anchor minute and member report identifiers. The rows are G1 A X 0 R1/R2; G2 A X 7 R3; G3 B X 2 R4/R5; G4 A Y 1 R6. Check that each original identifier appears once and that the member counts sum to six. Add a note stating that the five-minute endpoint is inclusive. If the rule changes to a rolling window, preserve this version before regrouping so a changed total can be explained through the rule rather than mistaken for newly discovered evidence.