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

Alteryx designer Discussions

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

Rename Header- Add existing header and file name

Asteroid

Hello,

 

I need to create a new header from existing WF, current header is current_month & previous_month from two different month files,  but need to add file name to this headers so that respective month name will come. below is the input and output format

 

Attached the file, please help

 

Meteor

Hi,

 

Here is an answer of your request, tell me if its ok  

 

 

Asteroid

Hi Ismail,

 

Thank you for quick response.

 

It is almost there, I am getting month from the file name so I use the output as file name and do a text to column. I will have two files and will read the file name as month name and then add this to the existing header. Current time wont work because we are running the file same time. I hope I made it clear.

Pulsar

Hi @Raj_2 

 

Might this work?

image.png

 

Here I've read in both files (reading in the file name), and unioned the info together. Text to columns isolates the month from the file name. A DateTimeParse will extract a date field that can be used in a sort, to get the order in as previous then current. A Multi row formula tool creates the headers to be used in the following Crosstab tool. Finally, Select to put everything in order.

You'll likely need to adjust the Text to Columns, DateTimeParse, and potentially the Multi Row formula tools to 

Please let me know if this works for you.

Cheers!

Esther

Labels