Alteryx designer Discussions

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

Conditional Join

Highlighted
Meteor

Hi all,

 

I’d like to do an inner conditional join:

Table 1                            Table 2

Var Date                         Var Date

A     01/10/15                 A     28/09/15

B     02/11/15                 A     14/10/15

C     12/12/15                 A     17/10/15

 

I’d like to merge on:

Key1 = Var

Key2 = Date (only if Date in Table2 is greater than Date in Table1)

 

In our case, the result of the inner join is:

 

JoinTable

Var Date

A     14/10/15

A     17/10/15

 

Can we do that with Alteryx?

 

Thanks,

 

Franck

Highlighted
Alteryx Partner

Hi,

 

First join by VAR key fields, then Filter Tool where [Right_ date] is greater than [Date]

Highlighted
Alteryx Alumni (Retired)

"Conditional joins" are a common question for Alteryx users. With the Join tool by itself, there isn't a way to do this, But you can with a combination of tools.

 

Do a search on the Community for "conditional join". There are a few different articles in there that might give some different ways to get what you want. In particular, this one references the Advanced Join tool that you can download from the Gallery. You might want to check it out.

 

In the meantime, the attached workflow gets you the results.

Highlighted

Very disappointing that Alteryx cannot handle a such a simple join...

Labels