Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Joining two columns with common but non-identical contents

Scythe80
6 - Meteoroid

Hey all,

 

Essentially my problem is this. On one side of my data, which I may not manipulate, I have a column labeled "Period" with values of either P1, P2 or P3. The other side of my data has the same column "Period" but with values of P1 or P2/3. I want to create a join wherein P1s match with P1s and P2/3s match with both P2 or P3.

 

Does anyone have any ideas on how this could be accomplished?

 

My best guess so far would be to generate extra rows, such that each P2/3 column is duplicated and has a P2 value and P3 value, but I feel that would unnecessarily clutter my dataset, and could create unforeseen consequences. 

 

Thank you for your help!

2 REPLIES 2
BrandonB
Alteryx
Alteryx

What if in your data set that has P1, P2, and P3, you add a formula afterwards that creates a new column called Period Match using the following formula

 

IF [Period] = "P2" or [Period] = "P3"

THEN "P2/3"

ELSEIF [Period] = "P1"

THEN "P1"

ELSE [Period]

ENDIF

 

Then you could join your data set to the next data set using this period match column. Would this work?

Qiu
21 - Polaris
21 - Polaris

@Scythe80 
Something like this?

1223-YAC191185.PNG

Labels