Hi All,
Greetings!!!
I am working on a project where we need to reallocate agents frequently,
I am looking for a solution in Power Query where we can upload Input file PQ will check/match and merge details and update Mather as well as Log file.
So we have 3 sets of file
PQ needs to look in Pincode ( Column A) & Del Type ( Column E) together in the Input file and match the details in Pincode ( Column A) & Del Type ( Column D) in the matcher file.
If details are matching PQ to copy all the details from the Input file and paste in matcher file if Not matching PQ to keep original details ( Which are available in Matcher file) as it is – No changes required.
Note- Matcher has 2 sheets ( Sheet 1 & Sheet 2) PQ to check the details in both the sheets and update details wherever Pin Code and Del Type are matching.
Once this is done PQ to Append Log File, here PQ will paste data which is transferred ( Copy Pasted) from the Input file to Matcher ( Means where Pin code and Del Matching and copied from Input to Matcher file) and automatically put activity date (Current system date ) in a log file.
I know this is a bit critical job, please let me know if this is possible in PQ or suggest any other system/app which will help me perform this task.
Attaching Sample data for ready reference.
Thanks & Regards,
Sanket
Greetings!!!
I am working on a project where we need to reallocate agents frequently,
I am looking for a solution in Power Query where we can upload Input file PQ will check/match and merge details and update Mather as well as Log file.
So we have 3 sets of file
- Input- Pincode Mapping Where we get change requests form filed team
- Mather – Based on the input file, we need to update the matcher file so that manager can allocate jobs accordingly
- Log File – where we need to record all changes made
PQ needs to look in Pincode ( Column A) & Del Type ( Column E) together in the Input file and match the details in Pincode ( Column A) & Del Type ( Column D) in the matcher file.
If details are matching PQ to copy all the details from the Input file and paste in matcher file if Not matching PQ to keep original details ( Which are available in Matcher file) as it is – No changes required.
Note- Matcher has 2 sheets ( Sheet 1 & Sheet 2) PQ to check the details in both the sheets and update details wherever Pin Code and Del Type are matching.
Once this is done PQ to Append Log File, here PQ will paste data which is transferred ( Copy Pasted) from the Input file to Matcher ( Means where Pin code and Del Matching and copied from Input to Matcher file) and automatically put activity date (Current system date ) in a log file.
I know this is a bit critical job, please let me know if this is possible in PQ or suggest any other system/app which will help me perform this task.
Attaching Sample data for ready reference.
Input- Pincode Mapping.xlsb | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
1 | Pin code | District | Agent Name | Scenario | Del Type | #Type | Tran Type | Geography | Agent ID | ASC City | Agent Pincode | State | Branch | Distance between Agent to Upcountry Pincode | Remarks If Any | ||
2 | 221301 | SANT RAVIDAS NAGAR | Santosh Nikam | Same Day | Door Step | Delivery | Bike | Up country | 2552890 | VARANASI | 221010 | UP | UP & UK | 20 | |||
3 | 221310 | SANT RAVIDAS NAGAR | Kiran Kumar | Next Day | On Floor | Delivery | Local Trans | Up country | 2552890 | VARANASI | 221010 | UP | UP & UK | 34 | |||
4 | 221406 | SANT RAVIDAS NAGAR | Amit Anand | Next Day | On Floor | Delivery | Local Trans | Up country | 2552890 | VARANASI | 221010 | UP | UP & UK | 40 | |||
5 | 231001 | MIRZAPUR | Satish More | Same Day | Door Step | Delivery | Bike | Local | 2552890 | VARANASI | 221010 | UP | UP & UK | 17 | |||
Matcher Update |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
H2:H5 | List | Local,Upcountry |
Matcher.xlsx | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
1 | Pin code | Agent Name | Scenario | Del Type | MAG | Geography | Agent ID | #Type | District | ASC City | Agent Pincode | State | Branch | Distance between ASC to Upcountry Pincode | Remarks | ||
2 | 221301 | Surendra Mane | Same Day | Door Step | D12 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
3 | 221301 | Surendra Mane | Same Day | Door Step | D13 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
4 | 221301 | Surendra Mane | Same Day | Door Step | E01 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
5 | 221301 | Surendra Mane | Same Day | Door Step | E02 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
6 | 221301 | Surendra Mane | Same Day | Door Step | E04 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
7 | 221301 | Surendra Mane | Same Day | Door Step | E07 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
8 | 221301 | Surendra Mane | Same Day | Door Step | E10 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
9 | 221301 | Prasad Aok | Same Day | Door Step | E13 | Local | GCS045383 | Pick Up | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
10 | 221301 | Surendra Mane | Same Day | Door Step | E14 | Local | GCS045383 | Pick Up | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
11 | 221301 | Surendra Mane | Same Day | Door Step | E15 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
12 | 221301 | Surendra Mane | Same Day | Door Step | E17 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 9.2 | |||
13 | 221380 | Girish Oak | Same Day | Door Step | E18 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
14 | 221380 | Girish Oak | Same Day | Door Step | E20 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
15 | 221380 | Girish Oak | Same Day | Door Step | E25 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
16 | 221380 | Girish Oak | Same Day | Door Step | E30 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
17 | 221380 | Girish Oak | Same Day | Door Step | E34 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
18 | 221380 | Sanjay Jadhav | Same Day | Door Step | E35 | Local | GCS045383 | Pick Up | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
19 | 221380 | Sanjay Jadhav | Same Day | Door Step | E37 | Local | GCS045383 | Pick Up | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
20 | 221380 | Girish Oak | Same Day | Door Step | E38 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
21 | 221380 | Girish Oak | Same Day | Door Step | E39 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 25 | |||
22 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E40 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
23 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E41 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
24 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E42 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
25 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E43 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
26 | 221406 | Nana Patekar | Same Day | Door Step | E52 | Local | GCS045383 | Pick Up | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
27 | 221406 | Nana Patekar | Same Day | Door Step | E53 | Local | GCS045383 | Pick Up | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
28 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E55 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
29 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E84 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
30 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E85 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
31 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E86 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
32 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E91 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
33 | 221406 | Bhaskar Kurtadkar | Same Day | Door Step | E92 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 13 | |||
34 | 221301 | S J Joshi | Same Day | Door Step | E93 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 27 | |||
35 | 221301 | S J Joshi | Same Day | Door Step | E95 | Local | GCS045383 | Delivery | Central Delhi | West Delhi | 110015 | DL | DELHI | 27 | |||
Sheet1 |
Log File.xlsx | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
1 | Pin code | District | Agent Name | Scenario | Del Type | #Type | Agent ID | ASC City | Agent Pincode | State | Branch | New Branch | Distance between Agent to Upcountry Pincode | Geography | Log Change Date | ||
2 | 221301 | SANT RAVIDAS NAGAR | Sharad Pawar | Same Day | Door Step | Pickup | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 20 | Up country | 01-07-21 | ||
3 | 221303 | SANT RAVIDAS NAGAR | Rahul Gandhi | Next Day | On Floor | Pickup | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 23 | Up country | 22-06-21 | ||
4 | 221304 | SANT RAVIDAS NAGAR | Nana Patole | Next Day | On Floor | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 33 | Up country | 28-06-21 | ||
5 | 221306 | VARANASI | Bhosle | Same Day | Door Step | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 16 | Up country | 20-06-21 | ||
6 | 221308 | SANT RAVIDAS NAGAR | Ajit Pawar | Same Day | Door Step | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 39 | Up country | 03-06-21 | ||
7 | 221309 | SANT RAVIDAS NAGAR | Rahul Gandhi | Next Day | On Floor | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 38 | Up country | 29-06-21 | ||
8 | 221310 | SANT RAVIDAS NAGAR | Bhosle | Next Day | On Floor | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 34 | Up country | 11-06-21 | ||
9 | 221314 | SANT RAVIDAS NAGAR | Nana Patole | Same Day | Door Step | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 28 | Up country | 14-06-21 | ||
10 | 221401 | VARANASI | Nimkar | Same Day | Door Step | Pickup | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 30 | Up country | 21-06-21 | ||
11 | 221402 | SANT RAVIDAS NAGAR | Sharad Pawar | Next Day | On Floor | Pickup | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 40 | Up country | 11-06-21 | ||
12 | 221404 | SANT RAVIDAS NAGAR | Chkakankar | Next Day | On Floor | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 45 | Up country | 02-06-21 | ||
13 | 221406 | SANT RAVIDAS NAGAR | Nana Patole | Same Day | Door Step | Delivery | 2552890 | Mirzapur | 231001 | UP | Lucknow | Uttar Pradesh & Uttarakhand | 40 | Up country | 10-06-21 | ||
Log File |
Thanks & Regards,
Sanket