Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Filtering out values that contain anything but a number

wht822
7 - Meteor

Hello,

 

One column in my dataset contains multiple different types of data (addresses, dates, numbers, etc...). and I want to filter out anything that contains a non-numeric value. This way, titles and dates are all done away with and I'm only left with columns that are only a numeric value. I feel like this could be a simple solution, but I'm having difficutly coming up with it. Does anyone have any ideas?

 

 

Thanks!

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

Filter using:

 

regex_countmatches([field],"\D") > 0

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
wht822
7 - Meteor

Looks like that filtered out everything but whole numbers. Any idea how I could keep non-whole numbers as well?

MarqueeCrew
20 - Arcturus
20 - Arcturus

This version allows for {0-9,commas,decimal points}

 

Filter using:

 

regex_countmatches([field],"[^\d,\.]") > 0

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
rdeeparnell
5 - Atom

do I still need to change the data type of the field that I am filtering?  I keep getting the following error: Formula:tried to apply string operator to numeric value

Labels
Top Solution Authors