Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Delete Dynamic Number of White Space

Mike_at_CG
8 - Asteroid

Hi All

 

I've tried a couple different variations of the REGEX tool to try this but to no luck.  Tried to piece it together and thanks to those that have answered so far.

 

Have a bit of gnarly data set where I am trying to delete all white space except for a space after each bit of text.

 

Mike_at_CG_0-1667512525877.png

 

The white space that comes through on this file could be different for each field.

 

As an example the distance between O and O on the first line could be 12 spaces.  Or it could be 15 spaces.  Same for AGT at the bottom. Could be one space. Could be 50.

 

Any help would be greatly appreciated!

 

Thank you

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @Mike_at_CG, in the Data Cleanse tool, one of the options is to delete duplicate whitespace! :)

Mike_at_CG
8 - Asteroid

Spooky fast answer! Much appreciated.  And for all of the other answers in the event I need them again someday :)

DataNath
17 - Castor
17 - Castor

No problem @Mike_at_CG! Though I would actually pull myself up here - performance-wise the Data Cleanse route isn't fantastic as it's actually a macro and if you just need to do a single fix (out of all the possible configurations) it's certainly overkill to have Alteryx run all of your data through that before returning to your main flow. You'd be better off just handling it within a formula tool, using an expression like the following (which is actually what's going on under the hood of this DC tick box anyway):

 

DataNath_0-1667514212043.png

Labels
Top Solution Authors