Forum Discussion
Need help connecting different data based on date and customer ID
Hello.
Hoping someone can point in in the right direction on this.
Our drivers are assigned routes every day with service stops to customers. At each stop, they submit a service ticket which is assigned to that customer's unique ID#. I need to show which stops are made or skipped each day by comparing the Ticket submittals to the scheduled stops. But not every scheduled stop will have a service ticket and there might be multiple tickets for the same account but on different dates. I put together some example data below. I would greatly appreciate any guidance on how to combine this for final result. Thank you!
- have a scheduled Routes table which shows the Date scheduled, customer ID.
- I have a Delivery table which shows the date of ticket submittal, Ticket number, and customer ID.
- And I have a Date table.
| Date Table Example | |||||
| Date | Year | Quarter | Month | Month Name | Day of Week Name |
| 22-Dec-22 | 2022 | Q4 | 12 | December | Thursday |
| 27-Dec-22 | 2022 | Q4 | 12 | December | Tuesday |
| 28-Dec-22 | 2022 | Q4 | 12 | December | Wednesday |
| 25-Jan-23 | 2023 | Q1 | 1 | January | Wednesday |
| Assigned Routes | |||
| Route Name | Date | Area | Cust Account No |
| Driver2 | 22-Dec-22 | LP13 | 14733 |
| Driver4 | 22-Dec-22 | LP13 | 18780 |
| Driver2 | 22-Dec-22 | LP13 | 20059 |
| Driver2 | 22-Dec-22 | LP13 | 21442 |
| Driver4 | 22-Dec-22 | LP13 | 23524 |
| Driver3 | 22-Dec-22 | LP13 | 23536 |
| Driver3 | 22-Dec-22 | LP13 | 30219 |
| Driver3 | 22-Dec-22 | LP13 | 30969 |
| Driver3 | 22-Dec-22 | LP13 | 31255 |
| Delivery Tickets | ||
| SubmissionNo | Cust Account No | Date |
| TK000160210 | 14733 | 22-Dec-22 |
| TK000160211 | 18780 | 22-Dec-22 |
| TK000160212 | 20059 | 22-Dec-22 |
| TK000160213 | 21442 | 22-Dec-22 |
| TK000160214 | 23536 | 22-Dec-22 |
| TK000160215 | 08440 | 22-Dec-22 |
| TK000160216 | 16203 | 22-Dec-22 |
| TK000160217 | 15651 | 22-Dec-22 |
| TK000160218 | 765 | 22-Dec-22 |
| TK000157525 | 10725 | 25-Jan-23 |
1 Reply
- lbendlin
Super User
Please provide sample data that covers your issue or question completely.
Please show the expected outcome based on the sample data you provided.