Alteryx Designer Desktop Discussions

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

Embedded Newlines in CSV Format

PeterAP
8 - Asteroid

Does anyone how you can output a dataset from Alteryx to CSV which has embedded newlines in it? I don't want to remove the newlines from the field itself.

 

I.e. with out the newlines, in my output I get the following:

 

DESCRIPTION1 DESCRIPTION2 DESCRIPTION3

 

But I want to get:

 

DESCRIPTION1

DESCRIPTION2

DESCRIPTION3

 

Thanks!

3 REPLIES 3
echuong1
Alteryx Alumni (Retired)

You can concatenate the values together and use "\n" as the delimiter, which stands for new line.

 

echuong1_0-1610130131660.png

 

danilang
19 - Altair
19 - Altair

Hi @PeterAP 

 

Since your data already has the newlines in it, you can just output to a csv.  Your output file(with an extra ID field) will look like this

 

Concat_Field1,ID
"DESCRIPTION1
DESCRIPTION2
DESCRIPTION3",1

 

You should be aware of the warning given by Alteryx about the newlines in the data 

 

danilang_1-1610199145579.png

 

The embedded new line may cause errors when you try to load the file into 3rd party apps.  It opens in Alteryx and Excel with no issues, but some other programs may split the file into records on the newline before parsing, causing incorrect results

 

Dan  

 

 

 

PeterAP
8 - Asteroid

Thanks @echuong1, I had concatenated in a different way using the multi-row formula tool, but I think your method is best.

 

I think the problem I was having was actually due to the way in which Power BI was reading it in rather than the Alteryx Output. However in the PBI data source settings I was able to change the options to "Apply all line breaks" and it worked.

Labels
Top Solution Authors