Forum Discussion
Count concurrent connections
Hi All,
I have been trying to work through a solution to help me map out on a daily basis during each month the max concurrent connections that were established. I have the start and end date and time in a column each as in the images below (snapshot of a time period within a single day)
some users disconnect and reconnect as well and sometimes start and end times or rows overlap which shouldn't be possible but we do not want these included. (example Dave in the below sample data has 5 connections the 3rd and 4th connection overlap.)
StartTime || User || EndTime
Been struggling with this for few days and any assistance would be excellent.
Kind regards,
Lloyd
lloydchughes ,Check if a new column like that can help
OverLap =
var _end = [EndTime]
Var _cnt = countx(filter(Table, [USer] = earlier([User]) && [StartTime] <=_end && [EndTime] >=_end ),[User])
return
if(isblank(_cnt), "No concurrent", "concurrent")
or
OverLap =
var _end = [StartTime]
Var _cnt = countx(filter(Table, [USer] = earlier([User]) && [StartTime] <=_end && [EndTime] >=_end ),[User])
return
if(isblank(_cnt), "No concurrent", "concurrent")
2 Replies
- amitchandakSuper User
lloydchughes ,Check if a new column like that can help
OverLap =
var _end = [EndTime]
Var _cnt = countx(filter(Table, [USer] = earlier([User]) && [StartTime] <=_end && [EndTime] >=_end ),[User])
return
if(isblank(_cnt), "No concurrent", "concurrent")
or
OverLap =
var _end = [StartTime]
Var _cnt = countx(filter(Table, [USer] = earlier([User]) && [StartTime] <=_end && [EndTime] >=_end ),[User])
return
if(isblank(_cnt), "No concurrent", "concurrent")
- lloydchughesNew Member
Thank you for assistance amitchandak sorry meant to get back to this but been busy.