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!
Solved! Go to Solution.
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
I just need to know how to get data into the header. I'm set on finding previous dates and so-on.Thanks!
I believe the tool you’re looking for is the Dynamic Rename tool under the Developer tool category.
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |