community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How to use Contains when String and Target are columns

Asteroid

I'm trying to search a single value of Column A in comma separated list in Column B. But unfortunately Contains doesn't work with the format "Contains([Procedure], [HCPCS])

 

Captudddre.PNG

Alteryx
Alteryx

Try using the attached workflow. Hope this helps!

Meteor

If you want to flag the record, I took what bpatel did and made a minor change to make it a bit more dynamic.

 

 

Asteroid

That's a nice way to split column into rows. Thanks @bpatel I tried using the tool Text to Columns; looks like it has a limit of 43 rows. It doesn't split more than 43?

Alteryx
Alteryx

The Text to Columns tool does parse out more than 43 rows. The number of rows depends on what is being parsed out.

Nebula
Nebula

Hi @monish_chandra 

 

Not to diminish the utility of the solutions provided by @bpatel  or @JShankman , but your initial Contains function had the fields reversed

 

 

"Contains([Procedure], [HCPCS])

 

 

The syntax is actually "Contains([Field to search in], [Value to find]) .  if you change it to "Contains([HCPCS], [Procedure]), you'll find it returns true for the 1st record and false for the second

 

Dan

Labels