Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Dynamic Rename of Headers

hemant86
11 - Bolide

Hi Team,

 

I want to rename my headers dynamically. For current financial year the headers are as below

 

MinWage_4/1/2021MinWage_5/1/2021MinWage_6/1/2021MinWage_7/1/2021MinWage_8/1/2021MinWage_9/1/2021MinWage_10/1/2021MinWage_11/1/2021MinWage_12/1/2021MinWage_1/1/2022MinWage_1/2/2022MinWage_1/3/2022

 

I want the headers should change to as below dynamically for next financial year. Basically only the year is changing and rest of the header remains same.

 

MinWage_4/1/2022MinWage_5/1/2022MinWage_6/1/2022MinWage_7/1/2022MinWage_8/1/2022MinWage_9/1/2022MinWage_10/1/2022MinWage_11/1/2022MinWage_12/1/2022MinWage_1/1/2023MinWage_1/2/2023MinWage_1/3/2023

 

Appreciate any help. Thanks in advance.

18 REPLIES 18
Luke_C
17 - Castor

Hi @hemant86 

 

Look into the dynamic rename tool. You could use a formula to replace 2021 with 2022

 

https://help.alteryx.com/20214/designer/dynamic-rename-tool

 

binuacs
21 - Polaris

@hemant86 as @Luke_C  suggested 

binuacs_0-1645109680835.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @hemant86 

 

Another way using Regex

 

atcodedog05_0-1645109966389.png

 

Hope this helps : )

 

hemant86
11 - Bolide

Thanks @Luke_C . I was trying the same but I guess I was goin wrong with the expressions. I managed to fix that now. Thanks Again

Luke_C
17 - Castor

Glad you're set @hemant86 . Lots of great solutions here don't forget to mark them as such! 

atcodedog05
22 - Nova
22 - Nova

Hi @hemant86 

 

If you are looking for dynamic solution where for coming years you don't need to change the formula you can give a look at @binuacs and my approaches.

 

Hope this helps : )

hemant86
11 - Bolide

Thanks @atcodedog05 . Not very good at reg Ex. I missed to mention that I'm keeping the Headers fixed as "MinWage_04/01/" and only adding Year at the end. But since the formula changes for last 3 columns I'm currently using 2 Dynamic tool to achieve that. How can I achieve this only using 1 dynamic tool.

atcodedog05
22 - Nova
22 - Nova

Hi @hemant86 

 

Possibly I am not clear on your ask. In my workflow it dynamic adds +1 year to all columns.


Can you provide some sample input and expected output It will help us get a better understanding of the usecase.

We will be happy to help : )

 

 

binuacs
21 - Polaris

@hemant86 both the given solutions updates the last three months as you expected

binuacs_0-1645114912894.png

 

Labels