This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I need help to join my 2 datasets using the common column dates.
Joining can follow two conditions-
1- If dates matches - they join
2 if they don’t match - we join using the next date
3 if next date is not present we can join using next to next date
For example -
Dataset1 Dataset2 | Output
1-02-2019 1-02-2019 1-02-2019
2-02-2019 2-02-2019 2-02-2019
3-02-2019 6-02-2019 7-02-2019
4-02-2019 8-02-2019 10-02-2019
Please help me with this.
Here is my solution:
- append 2 data streams to create all permutations
- calculate distance between dates in days
- filter for when date1>=date2 and select smallest distance
#Excuse me, do you speak Alteryx?