Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

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

Highlighted
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

 

Highlighted
Alteryx Certified Partner

Hi @collinjd

 

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

Highlighted
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.

 

Cheers!

NJ

8 - Asteroid

Great thank you so much!

Labels