Hi folks,
I've done some pre-work cleaning data as it comes in via query, though there are outliers that I don't want to continue to accommodate via SQL. I'd rather do any additional cleansing/normalization of the data using the Alteryx tools, if possible.
When certain text shows up in a field, I need it removed....THEN normalize what is left over into a consistent format, with leading zeros.
I believe data can be removed via: REPLACECHAR(REPLACECHAR([Yourfield],'"',''),"'","")
Pending that works, how would I have the tool (or another in a following step) analyze and append needed leading zeros.
Any help is appreciated. Thanks!
.: Mike
INPUT | DESIRED OUTPUT |
ABC1234 | 001234 |
123456 | 123456 |
QWER12345 | 012345 |
POI 012345 | 012345 |
Solved! Go to Solution.
Hi @BrotherMAK ,
Attached is an example showing how to do it with regex tool and also another way of doing with data cleansing tool.
Let me know if this works for you.
BEst,
Fernando Vizcaino
@DavidP , the exact same solution, both suggesting two ways of doing it!!!! Incredible!!
@fmvizcaino, great minds!
ha a little bit late @DavidP @fmvizcaino but can I still join the great minds party?!
Fantastic! Thanks everyone! Looks like everyone had more or less the same idea.
I was about to punch myself as I wasn't getting the desired result until, like an idiot, I realized I wasn't replacing my key column as the output of the flow. Did that and getting the hits I was looking for. This was perfect. (PS...I went with the Data Cleansing tool as it was much simpler for what I needed. I'll keep the regex in mind if I end up with more complex stuff, that's what I used in the originating query)
PS. Don't mind the million browses and multiple outputs 🙂 Doing some checks along the way.
Thanks again.
.:MAK