Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

N to N matching (1 to N loop ?)

SaoriYamguchi
8 - Asteroid

Hi, I use Alteryx every day 

So,I want to match the two table.

 

Table A

USERID request1  request2  request3

U1            AA           12             aaa

U1            BB           23             bbb

U2            AA           Null           ccc

U3      Null         22             aaa

 

TableB

ITEMID  request1  request2  request3

IT1           AA           23            ccc

IT1          AA           22             ccc

IT2         AA             12            aaa

IT2         BB            22             aaa

IT3         CC           12            aaa

 

 

TableC (matching result)

USERID ITEMID

U3       IT3

U1         IT2  

 

 

So,TableA and TableB's request name are  same meaning.

And, ITEMID and USERID's want condition are multiple.

And,ITEMID and USERID's want condition are "Null" that means "Wildcard"(All matching)

 

I want to resolve the problem.

 

But,This problem is too compex.

I think that I use macro, but this problem is very complexity.

 

Thank you for your kindness.

 

 

 

 

9 REPLIES 9
BenMoss
ACE Emeritus
ACE Emeritus
It's difficult to understand exactly what you are looking for.

Based on the sample data you provided us, could you build a fourth table to show what the output would look lik3.

Ben
SaoriYamguchi
8 - Asteroid

Thank you ,I want to make Table 3 

 

SaoriYamguchi
8 - Asteroid

Sorry, I want to make tableC

 

TableA and TableB match after make TableC

 

Thank you

mceleavey
17 - Castor
17 - Castor

I think I understand the requirement, but I don't understand why in Table C you have U3 linked to IT3. That doesn't appear to be correct.



Bulien

SaoriYamguchi
8 - Asteroid

Thank you.

Sorry That is My mistake。

I miss the TableA and TableB's request2  are 22 only.

 

 

That is not match.

 

Thank you.

mceleavey
17 - Castor
17 - Castor

Hi @SaoriYamguchi,

 

Isn't it a simply case of matching across multiple fields?

If you join on all request fields like so:

 

join.PNG

You get the result:

Results.PNG

 

 

 



Bulien

SaoriYamguchi
8 - Asteroid
Thank you!!
But, UserID data have null that means wildcard.
I am confusing.
mceleavey
17 - Castor
17 - Castor

Hi @SaoriYamguchi,

The UserID is not being used in the join, so it wouldn't matter if it was populated or not.

The joins would be made on the combination of the requests only.



Bulien

SaoriYamguchi
8 - Asteroid

Thank you!

Labels