Alteryx Designer Desktop Discussions

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

Enter blank row before header

brunosa
7 - Meteor

Hi community,

 

I'm trying to create an output that I need to put my stream of data but I need to include 2 rows in blank before the header. I saw many workflow samples but I couldn't get to the desired results. Below is what I need as final result. The input data will be the header + rows/details.

 

Also important to say that I will have to apply datetime in the output which I already did and the format of output needs to be CSV. I'm saying that because I saw workflows using table tool but when adding datetime in the output name I didn't succeed also.

 

                  
                  
RowNumberTransact. DateDebit AccountCredit AccountTrans. AmountTrans. CurrencyDetailsLCY AmountDebit Type accountCredit type accountCUSTOMER TYPESERVICESSERVICE CATEGORYSOURCECUSTOMER TYPESERVICESSERVICE CATEGORYSOURCE
131/12/20221111222555 Pay Acc GG71119    
9 REPLIES 9
binuacs
20 - Arcturus

@brunosa One way of doing this

binuacs_0-1676906482704.png

 

apathetichell
18 - Pollux

@binuacs - that creates commas in between the nulls for the header rows - correct?

 

Off the top of my head - the most straight forward way I can think of doing this is assembling your data section into one column via record id/transpose/summarize (group by/concatenate (quotes and your delimiter or just your delimiter))

 

this will create a 1 field and then you will then append the two row/one column nulls over the data field. - then you can output to .csv...

 

basically @brunosa your request is for two different delimiters (blank lines and commas) so it's a bit more complicated than it sounds.

 

brunosa
7 - Meteor

@binuacs It did the work however in the output I still get the first line with data because of the "Fields" value inserted by Alteryx. My wish is to have total 2 blank lines then my header and the input data.

brunosa
7 - Meteor

@apathetichell do you have a workflow sample?

binuacs
20 - Arcturus

@brunosa uncheck the first row contains field name option in the output tool 

 

binuacs_0-1676973222034.png

 

binuacs
20 - Arcturus

@apathetichell you were right, it will create commas for the blank rows

binuacs_0-1676973456786.png

 

brunosa
7 - Meteor

Thanks @binuacs  and @apathetichell . In the end I had to do a few additional steps to get what I want.

 

I had to take my data then include another input that will show same headers as I have in the incoming data to union by position, after that I had to use the field tool to show the headers by row then apply record ID and finally cross tab. With that I could create a general header fields and my actual headers in the body of the data.

 

After it had to union again by position, skip 1st row. Then @binuacs  your tips for output name field and also valuable to say to unmark in the output field "First Row Contains Field Names".

 

Maybe not the best solution but worked just fine.

 

brunosa_2-1676990176667.png

 

 

 

 

 

apathetichell
18 - Pollux

Great to hear - if you want to check out my usual way to do it - take a look at the attached. Some of the strategies are the same.

brunosa
7 - Meteor

@apathetichell Yep. This is a good one indeed. Will also keep for use. Thanks a lot!

Labels