I am looking for some assistance in a complicated matter that I have been dealing with manually but would like automate through qlikview scripting. I currently have a list of records that have part number and serial number and each part number and serial number may have multiple service types (OH or IN) with different due dates. I would like to write my script such that it will pull in two records (OH and IN) for each part number and Serial Number when the difference between “TTO/I/R” for OH and IN is greater than 600. If the difference between “ TTO/I/R” is less than 600 I would like to Force the “SVC_TYPE” to be OH at the DUE DATE of the lesser TTO/I/R Value of the two.
I have pasted an example of the data and how the solution may play out below. I am begging for your assistance on this major pain.
Part No | Serial No | Description | Svc Type | TTO/I/R | Due Date | Duplicate Action | Due Date |
206-040-004-115 | A-141 | TRANSMISSION | IN | 1,395.0 | 1/20/2014 | Keep | 1/20/2014 |
206-040-004-115 | A-141 | TRANSMISSION | OH | 3,645.0 | 5/2/2016 | Keep | 5/2/2016 |
206-040-004-115 | A-144 | TRANSMISSION | IN | 1,026.0 | 9/5/2013 | Keep | 9/5/2013 |
206-040-004-115 | A-144 | TRANSMISSION | OH | 3,276.0 | 12/17/2015 | Keep | 12/17/2015 |
206-040-004-115 | A266 | TRANSMISSION | IN | 1,633.0 | 4/18/2014 | Remove | |
206-040-004-115 | A266 | TRANSMISSION | OH | 1,650.0 | 4/24/2014 | Keep | 4/18/2014 |
206-040-004-115 | A-279 | TRANSMISSION | IN | 396.0 | 11/25/2012 | Remove | |
206-040-004-115 | A-279 | TRANSMISSION | OH | 402.0 | 11/26/2012 | Keep | 11/25/2012 |
206-040-004-115 | A-298 | TRANSMISSION | IN | 1,361.0 | 1/5/2014 | Remove | |
206-040-004-115 | A-298 | TRANSMISSION | OH | 1,381.0 | 1/12/2014 | Keep | 1/5/2014 |