Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Dynamic Rename of column headers to Month & Year

ypt
7 - Meteor

Hi All

 

I'm trying to dynamic rename the column headers from the pic 1 to pic 2. I believe I should be using Formula in Dynamic Rename tool but I have difficulty ensuring that the year will be in accordance to the month e.g. Dec-22 to Jan-23.

 

This workflow will be reused in subsequent years and the column headers on the 13th run should be Mar-23 to Feb-24.

 

Thanks in advance.

 

1.

ypt_1-1660541502137.png

2.

ypt_2-1660541756805.png

 

 

5 REPLIES 5
binuacs
21 - Polaris

@ypt One way of doing this

 

binuacs_0-1660543279152.png

 

ypt
7 - Meteor

Hi @binuacs 

 

Thanks for the suggested solution. The workflow works fine until the 10th run. As it is based on DateTimeNow, for the last 2 runs which will take place in 2023, the column headers year will move to the Mar23-Feb24.

 

How can I ensure that the column headers will only change after the workflow has ran for all the months stated in the column headers (at least 12 runs)?

 

 

ypt_0-1660545403000.png

 

binuacs
21 - Polaris

@ypt the workflow is dynamic, it is taking the current year and calculating the 12 months. If you run the workflow in 2023, it will take that year and calculate the next 12 months and update the column headings

 

please find the result for the 2023 run

 

binuacs_0-1660546695360.png

 

sgwong
8 - Asteroid

I have anothe similar case and I would like to seek your advice to dynamic rename haeder.

 

Input

Input.jpg

 

Output

Output.jpg

sgwong
8 - Asteroid

can u provide workflow?

Labels