ALTERYX INSPIRE | Join us this May for for a multi-day virtual analytics + data science experience like no other! Register Now

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

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

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.




15 - Aurora

Hi @collinjd


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

14 - Magnetar
14 - Magnetar

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.




8 - Asteroid

Great thank you so much!