Hi guys... I have a table of records for multiple days which include identifiers for each person, a few other identifying characteristics, the date the record refers to and start and end times on that day. I am trying to get to a set of data which can be pivoted in Excel into the format:
Code:
08:00 09:00 10:00 11:00 etc.
Date 1 1 2 5 11
Date 2 2 3 6 15
Date 3 1 3 6 15
Date 4 2 2 4 13
etc.
This is so that I can filter down on categories and get to a list of how many people in that category fall within that timeslot based on their start and end times.
I have managed to do this, but it seems very cumbersome. I have a query for each timeslot which filters the main table based on the start and end times. I then have a further query which joins all these queries together into one long list so I have a record for every person for every timeslot in every day. Due to the processing load this creates I make this query export the data into a table, which as you can imagine makes for a very large database.
Can anyone think of a more efficient way of making the data pivotable into timeslots in the format above without having to produce a table with records for every single person/date/timeslot combination? I feel like there is something quite simple I'm overlooking.
Please note that whilst I am using Windows 8 and Office 2013, I have limitations that require compatibility with XP and Office 2003.