community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Looks aren't everything... But the latest Community refresh looks darn good!

Learn More
SOLVED

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

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

 

Alteryx Certified Partner

Hi @collinjd

 

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

Highlighted

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

Asteroid

Great thank you so much!

Labels