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

Automatically change output column headers based on month

jcornale
7 - Meteor

I have looked at many topics, but cannot find what I am looking for. 

 

I want to change the header in the output to the current month automatically. I was *hoping* there would be a way to say "[ThisMonth] Sales" for one column header and "[ThisMonth]-1 Sales", so that it would spit out "November Sales" and "October Sales". I already have all of the data manipulation figured out, so I am focused just on the text of the header of a couple columns. 

 

I want to avoid having to manually change the output file headers every month. I hope I explained that adequately.

 

I appreciate any assistance you can provide!

5 REPLIES 5
MarqueeCrew
20 - Arcturus
20 - Arcturus
The answer is yes. I’m mobile now and will check back when I’m near a computer.
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
MarqueeCrew
20 - Arcturus
20 - Arcturus

@jcornale,

 

Not seeing your data....

 

 

DateTimeStart() is the run-date of your job.

DateTimeFirstofMonth(DateTimeStart()) is the 1st day of the month of your job.

DateTimeAdd(DateTimeFirstofMonth(DateTimeStart()),-1,"day") is the Last day of the month of the month before your job ran.

DateTimeFormat(DateTimeAdd(DateTimeFirstofMonth(DateTimeStart()),-1,"day") ),"$b Sales") gets you Oct Sales if run any day in November.

 

Knowing these facts, I can see how I can calculate column headers based upon the rundate.  With these ideas in hand, if you need more assistance, please let us know.  Maybe you have some sample data to play with?

 

https://help.alteryx.com/11.5/index.htm#Reference/DateTimeFunctions.htm?Highlight=datetimeformat

 

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
jcornale
7 - Meteor

Here is some sample data. Thanks for your help!

jcornale
7 - Meteor

I just need to know how to get data into the header. I'm set on finding previous dates and so-on.Thanks!

jrgo
14 - Magnetar

@jcornale

 

I believe the tool you’re looking for is the Dynamic Rename tool under the Developer tool category.

Labels