Filtering out values that contain anything but a number
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Filter using:
regex_countmatches([field],"\D") > 0
cheers,
mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Looks like that filtered out everything but whole numbers. Any idea how I could keep non-whole numbers as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This version allows for {0-9,commas,decimal points}
Filter using:
regex_countmatches([field],"[^\d,\.]") > 0
cheers,
mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
