Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Let's say I have data like this:
TimeStamp |
2018-12-04 07:12:00 |
2018-12-04 07:14:00 |
2018-12-04 07:16:00 |
2018-12-04 07:17:00 |
2018-12-04 07:19:00 |
2018-12-04 07:22:00 |
2018-12-04 07:55:00 |
2018-12-04 07:56:00 |
2018-12-04 09:07:00 |
2018-12-04 09:11:00 |
What I would like to do is to graph the total number of records in 15 minute intervals. However, the twist is that I would also like the intervals with no records to show a count of 0. In other words, if there are no records in a certain time interval, a data point should still be graphed, but with a 0 value.
The result in this example should then be something like :
Date | Interval | Count |
2018-12-04 | 07:00 - 07:15 | 2 |
2018-12-04 | 07:15 - 07:30 | 4 |
2018-12-04 | 07:30 - 07:45 | 0 |
2018-12-04 | 07:45 - 08:00 | 2 |
2018-12-04 | 08:00 - 08:15 | 0 |
2018-12-04 | 08:15 - 08:30 | 0 |
2018-12-04 | 08:30 - 08:45 | 0 |
2018-12-04 | 08:45 - 09:00 | 0 |
2018-12-04 | 09:00 - 09:15 | 2 |
I have searched for an answer to this, but have only come up with solutions that work well when there are records, but they will exclude the time intervals where there are no records.
I hope you clever people can help me with a solution for this.
Thanks!
I think in order to get this, you would probably need The Master Calendar and The Master Time Table. This will help you generate your missing date and time ranges.
I think in order to get this, you would probably need The Master Calendar and The Master Time Table. This will help you generate your missing date and time ranges.