I have the following columns: User, Date, Start Time, Stop Time, Plates

Data populates from a csv file connection every time the document is opened

Users stay logged in for a block of time and then another user can log in, but the first user may come back later

Ex.

user 1
user 1
user 1
user 1
user 2
user 2
user 1
user 1
user 2
user 2
user 2
user 2

I want to calculate the total time the user is logged in my taking the [(Max end time of the first group of user 1 on date X ) - (Min start time of the first group of user 1 on date X ) + (Max end time of the first second group of user 1 on date X ) - (Min start time of the second group of user 1 on date X )] / (number of entries on date X)

Ideally this data would be on a pivot chart.

I can display the min of start, max of end as values and filter by date and display the users as individual series, but I cannot divide by the # of entries to get the #entries per hour and account for any time they step away and another user comes in.

Any help would be greatly appreciated.