Hello Everyone, I am working on two datasets. Below are the details -
Dataset 1:
Date
toyCategory
01-01-2020
toy1
25-08-2017
toy2
04-04-2016
toy2
04-01-2015
toy3
15-09-2016
toy1
Dataset 2:
toyCategory
Rate
StartDate
EndDate
toy3
0.9
01-01-2015
31-12-2015
toy2
1.1
16-08-2016
31-08-2017
toy1
1.2
01-01-2016
15-10-2016
toy1
1
16-10-2016
31-12-2999
toy2
1.24
15-02-2015
15-08-2016
I want to create a new column in 1st dataset, which will contain the "Rate" from the 2nd dataset. I want to pull the rates for each toy category present in dataset 1 based on a condition -
Date in dataset 1 should fall between the Start Date & End Date given in dataset 2.
Accordingly, the "Rate" should be filled in the new column in Dataset 1.