First, let's use Power Query to structure the data we need.
1. Format your source data as a table, and create a query which references this table
RawData:
2. Now we can create a list of all possible start times, between the earliest and latest start times in your data, based on 30 min intervals:
TimeList:
3. Close and Load both queries as 'Connection Only', and 'Load to Data Model'
4. In PowerPivot, create a relationship between RawData[Start Time] and TimeList[Start Time]
5. Add the following measure (you can add in either table,m I added it to TimeList, then hid RawData from client tools)
6. Insert a pivot table, with Start Time and End Time as rows, and StaffCount as Values. Format to suit (tabular form, no subtotals, etc)
See attachment for worked example.
Bookmarks