Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Data Cleansing - Can you only remove white spaces from the header row not the entire colum

collinjd
8 - Asteroid

Hi, Is it possible to only remove white spaces from the header row not the entire column using the Data Cleansing tool? Or is there another tool that can do this?

 

I know you could probably do this using the trim function but have hundreds of columns would change regularly.

 

Thanks

 

3 REPLIES 3
LordNeilLord
15 - Aurora

Hi @collinjd

 

You can use the Trim() function in the dynamic rename tool to remove leading and trailing whitespce

NicoleJohnson
ACE Emeritus
ACE Emeritus

Try using the Dynamic Rename tool! You can select the fields you want to trim, and then use the formula Trim([_CurrentField_]) to remove leading/trailing whitespace, or Regex_Replace([_CurrentField_],"\s","") to replace all whitespace in your Header names.

 

The Dynamic Rename tool has a ton of other great functionality as well, such as renaming your columns with the values in your first row of data (I use that one all the time), or converting columns that are formatted as dates to other date formats.

 

Cheers!

NJ

collinjd
8 - Asteroid

Great thank you so much!

Labels