I am currently working on a project using data for a trucking company that ships nationally. We are trying to figure how much a new toll bridge being implemented would have cost us last year. In each shipment load there are multiple movements that results in multiple toll bridge crossings, even though it is going from say Cincinnati to Tampa, FL. Below is an example. So lets assume that looking below, the Cincy bridge is crossed 3 times. Cincy to Florence, Florence back to Cincy, Cincy to Tampa. I have tried to use a IF function to search for Cincinnati, OH and return 1 but as you can clearly see Cincinnati comes up 4 times when there realistically 3 Cincy bridge crossings. Another issues is that if a load goes from Cincy to Chicago there might no be a bridge crossing other than the truck going over the bridge to get an empty trailer in Florence to head back over Cincy and then to Chicago. There are over 100k thousand rows and 33k+ loads. Each load looks like below but there are 100's of different locations. I know that loads that start in NY and go to Chicago will not go over the Cincy toll bridge. The data was pulled using SQL. I am working on 3 months at a time. I can't come up with a function or idea of how to accurately count home many times a truck crosses the bridge without over counting. Any ideas. I am sure that if I get response I will have to explain more, which I am fine with. Mind you that for some reason the way the data was pulled using SQL I can't use pivot tables. Thank you for any ideas or assistance. If you need more info please ask.
A B C D E
1 Arrival Dates From 1/1/2015 to 3/19/2015
2 Order Header # Stop # Leg # Event City / State
3
4 0 4342141 1092701 HMT Cincinnati, OH
5 635752 4234728 1092701 LLD Florence, KY
6 0 4342142 1092701 DLT Cincinnati, OH
7 0 4342143 1122900 HLT Cincinnati, OH
8 635752 4234729 1122900 DRL Tampa, FL
A B C D E
1 Arrival Dates From 1/1/2015 to 3/19/2015
2 Order Header # Stop # Leg # Event City / State
3
4 0 4342141 1092701 HMT Cincinnati, OH
5 635752 4234728 1092701 LLD Florence, KY
6 0 4342142 1092701 DLT Cincinnati, OH
7 0 4342143 1122900 HLT Cincinnati, OH
8 635752 4234729 1122900 DRL Tampa, FL
Last edited: