We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Discussions

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

Using formula to compare two columns

Travis_Ratliff
8 - Asteroid

Hello All,

 

I have attached a sample workflow below

 

What I want to do is join my two inputs and then use a formula to create a new column labelled "Existing Name" and if "customer name" is in "customer company name" then it says the "customer name" and if it is not in "customer company name" then it says "N/A". But currently it is only checking if the name matches in that row not across the entire column.

 

Thanks

 

I also want to do the same thing with the contracts, but I assume I can do the same process so once I figure one out, I can just repeat it

4 REPLIES 4
Luke_C
17 - Castor

Hi @Travis_Ratliff 

 

The formula you have appears to have that logic, I'm curious why you're joining on the record IDs though. The Record IDs don't seem to have any correlation to the client names so you're ending up with records that have nothing to do with each other getting joined. Is that your expectation?

Qiu
19 - Altair
19 - Altair

@Travis_Ratliff 
I agree with @Luke_C  and moreover, I dont think the Join will mean anything if you are going to check one row not across the entire column.
I think we might better consider the Find and Replace tool in this case.

Sample Workflow.PNG

Travis_Ratliff
8 - Asteroid

@Qiu I am using the Join & Union tool together so that I do not drop any rows. For instance, the find and replace that you did drops one row. What I want the end result to look like is those first four columns untouched other than the unique tool and then the 5th column to be their name if it is in the other column and if not then say "N/A".

 

So, per your example you did basically everything except it dropped a row and changed the customer company name and agreement ID to null which I do not want

Travis_Ratliff
8 - Asteroid

@Qiu It works by adding your find and replace and formula to the end of the union tool.

 

Thanks

Labels