ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Can You Replace a Specific String in a Column Header

briankuhlmann
8 - Asteroid

I have the column headers

briankuhlmann_0-1766424532935.png

 

And the want to replace just the string in the below Image with the actual numerical months (ie 2025-09)

 

briankuhlmann_1-1766424703072.png

I know dynamic rename will replace if the column header matches exactly, but I just want the string portion matched.

 

5 REPLIES 5
jrlindem
12 - Quasar

Can you show a full example of the before data and desired (after) data?  I think I'm following your ask, but not 100% sure.  Even if the data is fake, it would be best to see the before and after examples.

 

Thanks, -Jay

griffinwelsh
12 - Quasar

See the attached solution. You can use the replace tool after transposing your data and then reassemble your table with cross tab.

 

griffinwelsh_0-1766428661684.png

 

SPetrie
13 - Pulsar

If I understand the ask, you can use the field info tool to grab your original header names, and a formula tool to copy them to create a new name field. Use Find and replace to create your updated field names and then dynamic rename to update them.

input.pngoutput.png

Qiu
21 - Polaris
21 - Polaris

@briankuhlmann 
Maybe its something like this if I understand your intention correctly?

1223-briankuhlmann.png

flying008
15 - Aurora

Hi, @briankuhlmann 

 

The 2 solutions for you as below:

 

Spoiler
'2025-' + 
PadLeft(ToString(ToNumber(Left([_CurrentField_], 1)) + 8), 2, '0') + REGEX_Replace([_CurrentField_], '^\dMonth', '_')

 

录制_2025_12_23_09_13_36_782.gif

Labels
Top Solution Authors