Hi All
I have a table with records having timein and timeout from terminal. I am trying to find count of the buses in 5 minutes buckets of the hour for each terminal.
data sample:
Bus terminal Timein Timeout
GGT rq1 20-01-22 05:56 20-01-22 06:11
CDC rq1 20-01-22 05:58 20-01-22 06:16
HFT rq2 20-01-22 06:18 20-01-22 06:39
ABC rq3 20-01-22 06:42 20-01-22 06:46
REQ rq2 20-01-22 06:56 20-01-22 06:58
Expected results:
That means rq1 will have count as:
0601-0605 0606-0610 0611-0615 0616-0620
rq1 2 2 2 1
similar for rq2 and rq3 to show count of buses where there is in and out time fall in the bucket of 5 minutes
So the column heading of crosstab should be like
06:01-06:05 06:06-06:10 06:11-06:15 06:16-06:20 06:21-06:25 06:26-06:30 06:31-06:35 06:36-06:40 06:41-06:45 06:46-06:50 06:51-06:55 06:56-07:00
Hope someone can provide an answer on how to do a crosstab or vba to get the results
I have a table with records having timein and timeout from terminal. I am trying to find count of the buses in 5 minutes buckets of the hour for each terminal.
data sample:
Bus terminal Timein Timeout
GGT rq1 20-01-22 05:56 20-01-22 06:11
CDC rq1 20-01-22 05:58 20-01-22 06:16
HFT rq2 20-01-22 06:18 20-01-22 06:39
ABC rq3 20-01-22 06:42 20-01-22 06:46
REQ rq2 20-01-22 06:56 20-01-22 06:58
Expected results:
That means rq1 will have count as:
0601-0605 0606-0610 0611-0615 0616-0620
rq1 2 2 2 1
similar for rq2 and rq3 to show count of buses where there is in and out time fall in the bucket of 5 minutes
So the column heading of crosstab should be like
06:01-06:05 06:06-06:10 06:11-06:15 06:16-06:20 06:21-06:25 06:26-06:30 06:31-06:35 06:36-06:40 06:41-06:45 06:46-06:50 06:51-06:55 06:56-07:00
Hope someone can provide an answer on how to do a crosstab or vba to get the results
Comment