Can anyone help with counting the data in this table (sample attached) into a table like the one below
ID | DateOn | DateOFF |
---|
A | 29/10/2015 | |
B | 20/04/2018 | 20/04/2018 |
C | 20/04/2018 | 20/04/2018 |
D | 21/03/2013 | |
J | 28-01-2017 | 07-05-2018 |
| | |
All IDs have a 'dateon' which will be counted unless there is a 'dateoff'
So ID A will be counted within all months below as it has been present for all of these months
J would only be counted in Feb- Apr as it was not present after May
I just need the
Thanks!
| Total on |
---|
Feb 18 | 14 |
Mar 18 | 14 |
Apr 18 | 14 |
May 18 | 12 |
Jun 18 | 12 |
Jul 18 | 12 |
Aug 18 | 12 |
Sep 18 | 11 |