Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

matching two string

Ekta
8 - Asteroid

Hi , 

I have a question on matching two columns which is

Column 1         Column 2

A####567B      A1234567B

 

How to create a formula to match them means values in both column matches .

 

Thanks in advance

10 REPLIES 10
Emil_Kos
17 - Castor
17 - Castor

Hi @Ekta,

 

I am not sure if I understood you correctly. If you want to match only few characters from the particular column and the structure is the same using combination of left + right formulas is the easiest way to achieve this goal:

 

Emil_Kos_0-1610348025644.png

This is the formula:

 

Left([Column 1], 1)+Right([Column 1], 4) = Left([Column 2], 1)+Right([Column 2], 4)

Qiu
20 - Arcturus
20 - Arcturus

@Ekta 
Lets try with RegEx?

0111-Ekta.PNG

joshuaburkhow
ACE Emeritus
ACE Emeritus

The RegEx solution from @Qiu will be a little more robust as you can search an entire string for only what you want. Really think about if those strings happen to change or grow somehow, you'll have to modify the workflow. 

 

Either one works so that's great!

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
Qiu
20 - Arcturus
20 - Arcturus

@joshuaburkhow 
Thank you so much for the comment.😁
So @Ekta How about an accept mark for me as well?

Ekta
8 - Asteroid

@Qiu  Thank you so much for the reply.

 

Can i please also check if # changes to X , how the formula changes please?

 

Thank you so much

 

Qiu
20 - Arcturus
20 - Arcturus

@Ekta 
It can do better.

Capture.PNG

Ekta
8 - Asteroid

Thanks a lot @Qiu , sorry this is giving me No Match , actually its Match:(

 

help me pls

 

Column 1         Column 2
Axxxx567X      A1234567X

 

Thanks in advance:)

Qiu
20 - Arcturus
20 - Arcturus

@Ekta 

It works just fine on my end.

.{4} stands for 4 single character. So as long as it is 4 single characters, it will create the match.

Capture1.PNG

Ekta
8 - Asteroid

Thanks @Qiu 

 

Appreciate it 🙂

Labels