Remove new line characters
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all,
I am trying to remove new line characters present in the data.
Currently we are using the "formula" macro and input Regex_Replace([FIELD], "\r*\n*", "") for each and every field.
When working with 100+ columns it becomes very cumbersome.
Is there a way to remove new line characters in one go from all columns?
Thanks.
Solved! Go to Solution.
- Labels:
- Join
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would consider to transpose all the columns and then remove it from the
data column. After removing new line chars you can then crosstab the data
back to normal. To transpose data you can watch this video.
https://vimeo.com/146105160
Best regards,
Daniel
--
Daniel Brun
+45 21 25 61 20 <++45+21+25+61+20>
a.Flæsketorvet 68, 1711 København Ve.daniel@inviso.dkt.@DanielPBrun
l.linkedin.com/in/danielbrunw.inviso.dk
Prøv Tableaueller Alteryxgratis i dag

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Echo,
try with "Multi-Field Formula" tool, then choose the fileds you want to remove new lines something like this Regex_Replace( [_CurrentField_], "\r*\n*", "")
i hope this way you can apply the same logic for multiple fileds in one go
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hidanielbrun,
Thanks for your reply.
The problem is that new line characters are present in the headers as well as the data.
So transposing won't help.
Any other suggestions?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
can you post some sample of your data struture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You could also Regex the field names after transposing. Please post some sample data, if you are able to.
Best regards,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
In the "Multi-Field Formula" tool, what syntax do we use to select all fields in the expression box??
Regex_Replace( [_ALLField_], "\r*\n*", "")
What do we use in place of ALLFIELDS?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In multi filed toold-->configuration --> select the "text" fileds as you have the New lines in string fileds
it will display all the string fileds then click on All
in the exp, Please the " Regex_Replace( [_CurrentField_], "\r*\n*", "")"
where _CurrentField_ is for all selected string fileds
Refer the below image
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That works!
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Your solution looks like it could work for my problem. However, in my multi-formua tool, it is already truncating my data. Please see attached screen shots. Can you let me know where I'm going wrong here please?
