Finding next record to calculate date difference

Hi @summer_le , since you know how to calculate difference, I will not look into that part, but only how to get start and end of time. One way to do this is as follows:

  1. Identify which rows are reads and writes into a column. This can be done via Rule Engine:
$Record$ LIKE "Read*" => "Read"
$Record$ LIKE "Write*" => "Write"

And say I write this result to a new column called “Type”:

  1. Now just group by Code and Type, and retrieve minimum and maximum of Time:
    image

Something like this will do:
image

Here’s the workflow: Get min and max Time of Read and Write per Code.knwf (18.0 KB)

2 Likes