Alteryx Designer Desktop Discussions

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

Comparing two strings on same row to determine if same record

Masond3
8 - Asteroid

Hi Team, 

 

Need some help / assistance. 

 

To date, i have extracted all the email domains in our db against a given company and created a unique output (As shown below) 

Example 

 

IdCompany NameEmail DomainTotal Count RecordRecords assigned
1111Mason LtdMASON.COM1916 84
1111Mason LtdHOTMAIL.COM19211
1111Mason LtdMASONLTD.COM1915
222Alteryx Alteryx.com1009898
222Alteryx Atkeryx.com10022

 

For a  next step, i would like to compare Company Name against Email Domain , to determine if the email domain contains the name of the company 

 

Expected out come 

 

IdCompany NameEmail DomainTotal Count RecordRecords assigned

Match

 

1111Mason LtdMASON.COM1916 84yes
1111Mason LtdHOTMAIL.COM19211No
1111Mason LtdMASONLTD.COM1915yes
222Alteryx Alteryx.com1009898yes
222Alteryx Atkeryx.com10022No

 

I tired doing contains if statement, however it wasnt returning any values, and not sure if a fuzzy match, would provide a good outcome ? 

Looking forward to your suggestions 

9 REPLIES 9
hlee36
8 - Asteroid

1.PNG2.PNGI would take the substring from company name in another field and then use the contain function.

 

Substring([Company Name],0,FindString([Company Name], " "))

 

Attached is workflow.

ed_hayter
12 - Quasar

I went for a brute force match with formula on the basis you want to check if the company matches or alternate company name with its suffix like (LTD, LLP etc.)


Attached workflow

Masond3
8 - Asteroid

Hi @hlee36 

 

Thanks for sharing this solution, 

 

I am encountering a problem, after the "Dynamic rename" the "Company Name" No longer exists. Consequently the first first row of data ( the one is now the row which has 84%) meaning that the formula is unable to calculate, as the "Company Name" is not a variable which can be passes

Masond3
8 - Asteroid

@ed_hayter Interesting solution, the downfall of this, it looks like it needs to an exact match. However it could  elimated all the easy match's first ( ie the 100%)

hlee36
8 - Asteroid

@Masond3 

3.PNG

 

Hey, I used the Dynamic Rename tool to take the first row of your data as Field name because when I copied and pasted your data into text input, it copied the field name as part of the data. 

 

If you already have your field name correctly, you can remove the Dynamic Rename tool.

ed_hayter
12 - Quasar

You could switch my formula at the end to be:

IF Contains([Email Domain], [ALT COMPANY]) then "Yes" ELSE "No" ENDIF to be slightly more forgiving.

 

Alt company at present is splitting on the first space so there would be issues if a company has multiple spaces in their name

Masond3
8 - Asteroid

@hlee36 

 

Thanks for taking your time to go through this.

 

So just quick question, for those companies, which only have one word ie Mercer , alteryx, how come the "Company" Field is blank ?

 

Matchin.PNG

Masond3
8 - Asteroid

@ed_hayter  Agree - so trying to work out a way to capture these different scenarios

hlee36
8 - Asteroid

@Masond3 

 

Hey, It was because the formula was finding space and take substring. I updated the formula with if statement so that the company name stays when there is no space.

Labels