Just wondering if someone else could test this as it doesn't appear to be working for me in 10.5? It used to work for Strings (when a integer was formatted as a string) but now it only appears to work for Numbers (when formatted as numbers). Thanks
IsNumber() will be true for numeric types. IsInteger() may be what your looking for: that will assess the value rather than the type.
(http://help.alteryx.com/10.5/Reference/Functions.htm#Test)
Thanks. You are right the definition has changed for IsNumber from 10 to 10.5:
10 = ISNumber(v) Tests if v is a number or not.
10.5 = ISNumber(v) Tests if the field type for v is a number or not.
Have to be careful upgrading! Seems a bit concerning when a function's definition changes so much between releases! I will use IsInteger instead. Thank you again for your help.
I have to say this clarification was quite helpfull. But how to test if a a String contains a number (which isn't an integer) in Alteryx 10.5 ?
IIF(ToString(ToNumber([field]))==[field],1,0)
This expression converts and tests to see if a string converted to a number and then converted back to a string is the same result. If it is, then the original value was a number.
$123 won't be a number.
123,456 won't be a number.
123.45.5 won't be a number.
Thanks,
Mark
Thanks for your answer.
That works partially:
- for the values like 19.84, that works
- for the values like 110.0, that doesn't work.
> I tried to delete the dot in the field (replace(field,".","")) but I still have the issue... Any help to fixe this would be quite welcome!!!