Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Rename Header- Add existing header and file name

Raj_2
8 - 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

 

3 REPLIES 3
ismailhab
7 - Meteor

Hi,

 

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

 

 

Raj_2
8 - 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.

estherb47
15 - Aurora
15 - Aurora

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