community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

To join dates

Asteroid

Dear All,

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 -

 

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

5-02-2019

7-02-2012

10-02-2019

 

Please help me with this.

 

Regards

 

 

Bolide
Bolide

Hi @Ekta,

 

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

 

img1.JPG

 

Thanks,

Rafal

 

#Excuse me, do you speak Alteryx?

Labels