I hope someone can help me out with a pivot table problem that I've yet tofigure out.
I have a table setup that counts the number of instances that a trailerdelivers on an hourly basis. E.g., we have 7 deliveries at 08:00 AM. Most ofour deliveries are given an hour to complete the unloading process, but we havea select few that are given two hours. Below is an example of how therelevant data is inputted into the sheet.
[TABLE="width: 574, align: left"]
<tbody>[TR]
[TD="width: 62"]Trailer
[/TD]
[TD="width: 68"]Version
[/TD]
[TD="width: 70"]Delivery
Freq
[/TD]
[TD="width: 70"]Delivery Days
[/TD]
[TD="width: 64"]Carrier
SCAC
Code
[/TD]
[TD="width: 92"]Commodity /
Supplier
[/TD]
[TD="width: 85"]Dock / Delivery Times
[/TD]
[TD="width: 117"]Unload/Reload
[/TD]
[TD="width: 70"]Delivery
Window
Start
[/TD]
[TD="width: 70"]Delivery
Window
End
[/TD]
[/TR]
[TR]
[TD]ZZZZ
[/TD]
[TD]1
[/TD]
[TD]5
[/TD]
[TD]MTWRF
[/TD]
[TD]ZZZZ
[/TD]
[TD="width: 92"]ZZZZ
[/TD]
[TD]132: 0:00-1:00
[/TD]
[TD="width: 117"]Unload / Reload
[/TD]
[TD="width: 70"]0:00
[/TD]
[TD="width: 70"]1:00
[/TD]
[/TR]
</tbody>[/TABLE]
The pivot table is essentially counting the number of trailers at the timedefined by delivery window start. I.e., DeliveryWindowStart as the row andcount of trailer as the values. The end result is like this...
[TABLE="width: 134"]
<tbody>[TR]
[TD="width: 96"]Window
[/TD]
[TD="width: 83"]Deliveries
[/TD]
[/TR]
[TR]
[TD]12 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]2 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 AM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]12 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]2 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 PM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]Grand Total
[/TD]
[TD]21
[/TD]
[/TR]
</tbody>[/TABLE]
The exact problem is when the deliverywindow end isn’t an hour after the start. If they take 2 hours to work a trailer,then it wouldn’t actually depart until 2:00 AM using the example data inputabove. Below is how I would input it into the sheet.
[TABLE="width: 574, align: left"]
<tbody>[TR]
[TD="width: 62"]Trailer
[/TD]
[TD="width: 68"]Version
[/TD]
[TD="width: 70"]Delivery
Freq
[/TD]
[TD="width: 70"]Delivery Days
[/TD]
[TD="width: 64"]Carrier
SCAC
Code
[/TD]
[TD="width: 92"]Commodity /
Supplier
[/TD]
[TD="width: 85"]Dock / Delivery Times
[/TD]
[TD="width: 117"]Unload/Reload
[/TD]
[TD="width: 70"]Delivery
Window
Start
[/TD]
[TD="width: 70"]Delivery
Window
End
[/TD]
[/TR]
[TR]
[TD]ZZZZ
[/TD]
[TD]1
[/TD]
[TD]5
[/TD]
[TD]MTWRF
[/TD]
[TD]ZZZZ
[/TD]
[TD="width: 92"]ZZZZ
[/TD]
[TD]132: 0:00-2:00
[/TD]
[TD="width: 117"]Unload / Reload
[/TD]
[TD="width: 70"]0:00
[/TD]
[TD="width: 70"]2:00
[/TD]
[/TR]
</tbody>[/TABLE]
That means there’s actually a 2ndtrailer being worked alongside the trailer that delivers at 1:00 AM. What Iwant my pivot table to show is below. How do I manipulate the pivot table tohelp me get there?
[TABLE="width: 134"]
<tbody>[TR]
[TD="width: 96"]Window
[/TD]
[TD="width: 83"]Deliveries
[/TD]
[/TR]
[TR]
[TD]12 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 AM
[/TD]
[TD="bgcolor: transparent"]2
[/TD]
[/TR]
[TR]
[TD]2 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 AM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]12 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]2 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 PM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]Grand Total
[/TD]
[TD]21
[/TD]
[/TR]
</tbody>[/TABLE]
I have a table setup that counts the number of instances that a trailerdelivers on an hourly basis. E.g., we have 7 deliveries at 08:00 AM. Most ofour deliveries are given an hour to complete the unloading process, but we havea select few that are given two hours. Below is an example of how therelevant data is inputted into the sheet.
[TABLE="width: 574, align: left"]
<tbody>[TR]
[TD="width: 62"]Trailer
[/TD]
[TD="width: 68"]Version
[/TD]
[TD="width: 70"]Delivery
Freq
[/TD]
[TD="width: 70"]Delivery Days
[/TD]
[TD="width: 64"]Carrier
SCAC
Code
[/TD]
[TD="width: 92"]Commodity /
Supplier
[/TD]
[TD="width: 85"]Dock / Delivery Times
[/TD]
[TD="width: 117"]Unload/Reload
[/TD]
[TD="width: 70"]Delivery
Window
Start
[/TD]
[TD="width: 70"]Delivery
Window
End
[/TD]
[/TR]
[TR]
[TD]ZZZZ
[/TD]
[TD]1
[/TD]
[TD]5
[/TD]
[TD]MTWRF
[/TD]
[TD]ZZZZ
[/TD]
[TD="width: 92"]ZZZZ
[/TD]
[TD]132: 0:00-1:00
[/TD]
[TD="width: 117"]Unload / Reload
[/TD]
[TD="width: 70"]0:00
[/TD]
[TD="width: 70"]1:00
[/TD]
[/TR]
</tbody>[/TABLE]
The pivot table is essentially counting the number of trailers at the timedefined by delivery window start. I.e., DeliveryWindowStart as the row andcount of trailer as the values. The end result is like this...
[TABLE="width: 134"]
<tbody>[TR]
[TD="width: 96"]Window
[/TD]
[TD="width: 83"]Deliveries
[/TD]
[/TR]
[TR]
[TD]12 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]2 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 AM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]12 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]2 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 PM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]Grand Total
[/TD]
[TD]21
[/TD]
[/TR]
</tbody>[/TABLE]
The exact problem is when the deliverywindow end isn’t an hour after the start. If they take 2 hours to work a trailer,then it wouldn’t actually depart until 2:00 AM using the example data inputabove. Below is how I would input it into the sheet.
[TABLE="width: 574, align: left"]
<tbody>[TR]
[TD="width: 62"]Trailer
[/TD]
[TD="width: 68"]Version
[/TD]
[TD="width: 70"]Delivery
Freq
[/TD]
[TD="width: 70"]Delivery Days
[/TD]
[TD="width: 64"]Carrier
SCAC
Code
[/TD]
[TD="width: 92"]Commodity /
Supplier
[/TD]
[TD="width: 85"]Dock / Delivery Times
[/TD]
[TD="width: 117"]Unload/Reload
[/TD]
[TD="width: 70"]Delivery
Window
Start
[/TD]
[TD="width: 70"]Delivery
Window
End
[/TD]
[/TR]
[TR]
[TD]ZZZZ
[/TD]
[TD]1
[/TD]
[TD]5
[/TD]
[TD]MTWRF
[/TD]
[TD]ZZZZ
[/TD]
[TD="width: 92"]ZZZZ
[/TD]
[TD]132: 0:00-2:00
[/TD]
[TD="width: 117"]Unload / Reload
[/TD]
[TD="width: 70"]0:00
[/TD]
[TD="width: 70"]2:00
[/TD]
[/TR]
</tbody>[/TABLE]
That means there’s actually a 2ndtrailer being worked alongside the trailer that delivers at 1:00 AM. What Iwant my pivot table to show is below. How do I manipulate the pivot table tohelp me get there?
[TABLE="width: 134"]
<tbody>[TR]
[TD="width: 96"]Window
[/TD]
[TD="width: 83"]Deliveries
[/TD]
[/TR]
[TR]
[TD]12 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 AM
[/TD]
[TD="bgcolor: transparent"]2
[/TD]
[/TR]
[TR]
[TD]2 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 AM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 AM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 AM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]12 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]2 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]4 PM
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]6 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]8 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]10 PM
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11 PM
[/TD]
[TD="bgcolor: transparent"]1
[/TD]
[/TR]
[TR]
[TD]Grand Total
[/TD]
[TD]21
[/TD]
[/TR]
</tbody>[/TABLE]