I need your help again. I have few fields in a dataset like below:-
| PSD | PED | EXF PRICE | VN EXF PRICE | HOSP PRICE | VN HOSP PRICE | PPP | Launch Date | EXF Less Discount | PPP Less Discount | HOSP Less Discount | SUD | RI DATE |
| 15/09/2017 | 31/10/2018 | 275.26 | 255.99 | - | - | 284.63 | - | 275.26 | 284.63 | - | 25/12/2018 | - |
| 01/10/2017 | 31/12/2018 | 275.2 | 255.94 | - | - | 284.57 | - | 275.2 | 284.57 | - | 02/01/2019 | 01/12/2018 |
| 01/10/2017 | 04/12/2018 | 235.37 | 218.89 | - | - | 243.48 | - | 235.37 | 243.48 | - | 25/12/2018 | 23/11/2019 |
Also, I have a reference file as:-
| Price1 | Price2 | | Date1 | Date2 |
| EXF PRICE | EXF Less Discount | | SUD | PED |
| EXF Less Discount | VN EXF PRICE | | PED | PSD |
| HOSP PRICE | HOSP Less Discount | | PSD | RI DATE |
| HOSP Less Discount | VN HOSP PRICE | | RI DATE | Launch Date |
| PPP | PPP Less Discount | | | |
What I want to do is, to check if the Price1 > Price2 and Date1 > Date2 (List of Price and Date is to be considered from the reference file)
Also, if Price2 is undefined (-) in data and the same field is used as Price1 on the next row then the original Price1 will be compared with the new Price2. For example, if EXF Less Discount is "-" then EXF PRICE must be greater than or equal to VN EXF PRICE. And the same logic I want to implement for Dates as well.
It would be a great help if anyone could suggest some ways to do this.