We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Column renaming - where column name in dataset are not fixed

ilovecoding
8 - Asteroid

Hi, My base dataset is not fixed and headers keep on changing every month. Hence Select tool is out of question

Otherwise how can i change my headers ? Dates keep on changing every month

 

Current dataset format

ilovecoding_0-1679651229665.png

Desire result

ilovecoding_1-1679651264402.png

 

4 REPLIES 4
Raj
16 - Nebula

do you want dates in place of previous and current?

ilovecoding
8 - Asteroid

i Want previous and current in place of dates

PangHC
13 - Pulsar

if it always last 2 columns.

Pang_Hee_Choy_0-1679652359651.png

if it always 2nd and 3rd, you can remove sort, and one of the recordId.

Christina_H
14 - Magnetar

I would calculate the dates you want to change and use a dynamic rename tool.

Christina_H_0-1679653353147.png

Formulas:
Previous: DateTimeFormat(DateTimeTrim(DateTimeAdd(DateTimeToday(),-1,"month"),"lastofmonth"),"%d-%b-%Y")

Current: DateTimeFormat(DateTimeTrim(DateTimeToday(),"lastofmonth"),"%d-%b-%Y")

These are based on the assumption that "Current" means the current month, but you can easily change them to whatever you need with DateTimeAdd, e.g. you might need -1 and -2 months.

Labels
Top Solution Authors