This is what did the trick for me, although I am convinced there are more elegant ways of writing this search. {location_desc}=_time - > pairs each Entrance and Exit with it`s corresponding timestamp Key was to stitch the data together using mvzip then to expand it using mvexpand so I can have Entrance and Exit times displayed on the same row. Search details: | fields first_name last_name _time, location_desc | eval location_desc=if(match(location_desc,"OUT"), "Exit", "Entrance") | eval name=first_name." ".last_name, {location_desc}=_time | stats values(Entrance) as Entrance values(Exit) as Exit by name | eval combined_data=mvzip(Entrance,Exit,"|") | mvexpand combined_data | eval fields=split(combined_data, "|"), Entrance=mvindex(fields,0), Exit=mvindex(fields,1), duration=round((Exit-Entrance)/3600, 2), Entrance=strftime(Entrance, "%d/%m/%Y %H:%M:%S"), Exit=strftime(Exit, "%d/%m/%Y %H:%M:%S") | table name, Entrance, Exit duration
... View more