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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Automatically change output column headers based on month

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!

Alteryx Certified Partner
Alteryx Certified Partner
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 reboot. Order shall return.
Alteryx Certified Partner
Alteryx Certified Partner

@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 reboot. Order shall return.
Meteor

Here is some sample data. Thanks for your help!

Meteor

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

Alteryx Certified Partner

@jcornale

 

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

Labels