Alteryx Designer Desktop Discussions

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

Dynamic rename column headers when headers change every week

teberhard
5 - Atom

I am a beginner user of Alteryx.  I have a data input file that has several columns that need to be renamed within my Alteryx workflow (see image).  In this example, I would need to rename "Latest Week Ending 02-23-20 Dollar Sales" to "LW Dollar Sales".  Each time this data input updates, it would have a new date, so I'm thinking I would need to rename dynamically.  Does anyone know how to do this or a better way?  Thanks in advance.

 

teberhard_0-1583418578288.png

 

3 REPLIES 3
kylemhabe
8 - Asteroid

If you are confident that the columns will remain in the same order, you can use a text input tool to store the column headers that you need.

 

Then you can use a union tool to put the defined column headers from the text input tool and your data together. Make sure that the union tool is configured to "Auto Config by Position" and "Set a Specific Output Order" is checked. Make sure that the defined column headers are first in the order. 

 

Finally, use a dynamic rename to "Take Field Names from First Row of Data." Make sure that all fields are checked including 'Dynamic or Unknown fields.'

 

I attached an example of how to do this.

echuong1
Alteryx Alumni (Retired)

Are the fields always in the same order?

 

I'd suggest using the dynamic rename tool. 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Dynamic-Rename/ta-p/32...

teberhard
5 - Atom

Yes, my columns will not change.  This worked, thankyou so much!

Labels