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

matching

ntudev
8 - Asteroid

Hello, can anyone help me with the below? i need i'm guessing a formula that will do the below. I need the last column to show match as long as ZIP & ZIP matches PIZ & PIZ1 even if the row is blank and if 1 number is off just say its not a match.

 

ZIPZIP1  PIZPIZ1does it match?
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412    match
259530311412    match
2595300    not match
8 REPLIES 8
DataNath
17 - Castor
17 - Castor

Do you mean like this? Workbook attached.

 

DataNath_0-1655222702454.png

 

CarliE
Alteryx Alumni (Retired)

@ntudev if you need those nulls to match here is my formula :

 

if [ZIP]=[PIZ] and [ZIP1]=[PIZ1] then "match" elseif length([ZIP])!=1 and Length([ZIP1])!=1 and IsEmpty([PIZ]) and IsEmpty([PIZ1]) then "match" else "not match" endif

CarliE_0-1655222826901.png

 

Carli
binuacs
21 - Polaris

@ntudev one way of doing this with the find and replace tool

#

binuacs_0-1655223420553.png

 

ntudev
8 - Asteroid

its good, but i need it to match the blank lines as long as its there

CarliE
Alteryx Alumni (Retired)

@ntudev , does my solution above solve that?

Carli
DataNath
17 - Castor
17 - Castor

@ntudev can you expand more on the logic?

 

'as long as ZIP & ZIP matches PIZ & PIZ1 even if the row is blank' - if there are blanks, ZIP & ZIP1 won't match PIZ & PIZ1 and so we can't consistently check for a match, especially if some numbers are different to the majority in that field.

 

'if 1 number is off just say its not a match' - if 1 number is off against what? Especially considering that, if any are blank then it'll always be off, even if it's the same as the majority in that column.

ntudev
8 - Asteroid

yes it does.

ntudev
8 - Asteroid

OK as i was working on this i found another challenge. How would i do the below? Note ZIP and PIZ should always equal to work. Can anyone help?

 

ZIPZIP1  PIZPIZ1does it match?
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530311412match
259530311412  259530 match
259530311412  259530 match
258888311412  258888159974not match
2599990  259999311412New
2510003114500  251000 New
251001320700    New
Labels