We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Output CSV file with a line above header

igorfv
8 - Asteroid

Hi,

 

How add a new line above with the word "#statementPU" CSV file header? I would like the same header below:

 
Img01.JPG
 

Thanks,

Igor

6 REPLIES 6
apathetichell
20 - Arcturus

 

follow these instructions exactly:

one... add a record id if you don't have one.

transpose - use recordid as a key column.

summarize tool-> group by record id/concat values - add your delimeter here.

create a second branch from your transpose -> create a second summarize tool -> concat name - add your delimieter

off of the name branch create a field called recordID - give it a value 0.

use a union tool.

 

use a text input tool.

put your new header in it

create a field called recordid - give it a value -1

attache to union tool.

sort by recordid

 

use select tool - drop recordid.

 

use output data. no headers. /0 as your your delimiter. NOTE - if you have commas in your data you may have errors. you can fix this by using a formula tool before your value summarize to add quotes around your values.

 

 

igorfv
8 - Asteroid

Hi @apathetichell 

 

Could you give me a sample, please?

 

Thanks,

Igor

binuacs
21 - Polaris

@igorfv Sample attached

image.png

apathetichell
20 - Arcturus

@binuacs - slight modification to include the original headers as a line. "borrowed" your workflow. sorry.

igorfv
8 - Asteroid

Hi @apathetichell and @binuacs 

 

It's working fine now.

 

Thank you.

 

Igor

apathetichell
20 - Arcturus

@igorfv - great - can you mark my solution and @binuacs ?

Labels
Top Solution Authors