Hello,
I'm new to Alteryx and require help with cleaning my dataset. I've recently been tidying unwanted characters in my dataset, largely using ReplaceChar in the Formula tool. This has been great up until now as I have two fields that are the following:
A:
B:
In both instances, I want the 1,285 and 366 to remain in the column, and the rest of the text to be discarded. I initially began to use the LEFT function but this would be problematic as the remainder of the data in the column is good and contains data ranging from 3-6 characters (e.g. 16,558), so this data would have been changed by the LEFT function, which I don't want.
Thanks,
KA
Solved! Go to Solution.
Hi @arundaka02 ,
the formula
LEFT([Field1], STRSPN([Field1],'0123456789.'))
may be a solution. STRSPN returns the number of characters in [Field1] consiting of the characters given in the second param - in your case, numeric including decimal separator. Does this help?
Best,
Roland
Just revisited the data and decided to parse the column with Text to Columns tool with the character 's'. Will then disregard the column with the remaining characters via the Select Tool.
Thanks!
KA