SOLVED
check data type of values in a column
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
SamSurya
8 - Asteroid
‎06-06-2020
11:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
how to check if the values in a particular column are numeric or string or alpha numeric. Also, How to check datatype of a column. Please help
Solved! Go to Solution.
4 REPLIES 4
20 - Arcturus
‎06-06-2020
11:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In a formula you can use an expression like:
IF
regex_match([Field],"[A-Za-z]+") THEN "Alpha" ELSEIF
regex_match([Field],"\d+") THEN "Numeric" ELSEIF
regex_match([Field],"[A-Za-z0-9]+") THEN "AlphaNumeric" ELSEIF
regex_match([Field],"[^A-Z,a-z]+") THEN "Printable Characters" ELSEIF
regex_match([Field],"[^ -~]+") THEN "Non-Printable Characters" ELSE
"Unknown"
ENDIF
If you use a multi-field formula, you can check the type with [_CurrentFieldType_].
Cheers,
Mark
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
‎06-07-2020
11:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thank you Marquee
I'm getting following error:
Formula (31) Parse Error at char(0): Formula: tried to apply string operator to numeric value (REGEX_MATCH) (Expression #1)
deviseetharaman
11 - Bolide
‎06-07-2020
11:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎06-08-2020
03:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Mark & Devi. this works, however, not sure if 0 is treated under /d as in case 0's it's moving to else part which is Unkown
