We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Contains Formula

bsheremeta
7 - Meteor

I have a column called 'TXT' and I would like to search through all the data in that column to check for numbers that have . in them. 

For example:

2329

23842

2482. 

 

The output should be 

Nope

Nope

2482.

 

I tried:

IIF(CONTAINS("." [txt]), [txt] , "NOPE") but that doesn't seem to work. Most likely the problem is with "." How can I achieve this?

Thank you!

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @bsheremeta 

 

It seems like in formula there is "," comma instead of "." dot. Can you check.

 

Current:

IIF(CONTAINS("," [txt]), [txt] , "NOPE") 

 

Required:

IIF(CONTAINS("." [txt]), [txt] , "NOPE") 

bsheremeta
7 - Meteor

Sorry, I just typed it wrong. Actual formula has a .

Edited original post.

atcodedog05
22 - Nova
22 - Nova

Hi @bsheremeta 

 

The issue is 2482. has been treated as number and converted to number and there by using its "." refer snapshot.

 

atcodedog05_0-1626804049411.png

 

Can you provide a sample file with few entries.

 

apathetichell
20 - Arcturus

contains is a string function and depending upon how your column is set up you may be trying to perform a numeric search with it... to search inside of number for numbers with decimals you can use something like contains(tostring([mynumber[),".")

 

also the format for contains is contains([column with "2482",".") not contains(".","2482") search term is second. You are searching if "2482." is in "." not vice versa.

atcodedog05
22 - Nova
22 - Nova

@apathetichell 

 

Good catch cant believe i missed that 😅🤣

Labels
Top Solution Authors