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

Alteryx Designer Desktop Discussions

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

I have to move data from one column to another where only the name of 1st column is fixed

swarajjoshi
7 - Meteor

Hello guys I want to move data from one column to another, where only the name of the first column is fixed (i.e."Initial") and the name of others column is dynamic as they are the dates. 

Note:- I want to move data from one column to another irrespective of any condition.

The sample data is mentioned below.

 

Input:-

CodeInitial2021_08_012021_09_012021_10_012021_11_012021_12_012022_01_012021_02_01
111015810085479
1126001051000941847
113510023198710758148
11416181112202188855649

 

Desired Output:-

Code2021_08_012021_09_012021_10_012021_11_012021_12_012022_01_012021_02_01
11101581008547
11260010510009418
1135100231987107581
114161811122021888556

 

What I have done is- Initial -> 2021_08_01, 2021_08_01 -> 2021_09_01 and so on

 

Please make sure that except first two columns i.e. code & Initial, every other column name would change.

For the last column the data is not important to make, it can create a new column for that or can me neglected.

 

Please guys its urgent, any help would be appreciated.

 

Thanks & Regards,

Swaraj Joshi

6 REPLIES 6
patrick_mcauliffe
14 - Magnetar
14 - Magnetar

Hey @swarajjoshi  what have you tried already?

swarajjoshi
7 - Meteor

I have tried using "Multi Row Formula", but I'm not much aware about it & also I saw some post about moving the data from one column to another but in that case the column names were static so I though a lot but then posting on community was the only option

Maskell_Rascal
13 - Pulsar

Hi @swarajjoshi 

 

Your sample data contradicts your instructions, so I'm a little unclear on what you are trying to accomplish. It doesn't appear that you are moving your data, but instead are renaming the columns. 

 

If you are just wanting to rename the columns, you can use a Dynamic Rename tool to do that. 

 

Input:

Maskell_Rascal_0-1631645764022.png

 

Output:

Maskell_Rascal_2-1631646153589.png

 

I made the assumption that your column names go in sequential order by the first of the month, and also that the data you posted was wrong in that the last column name should not be 2021_02_01 but instead 2022_02_01. 

 

Attached is a sample workflow. 

 

Let me know if this works for you. 

 

Cheers!

Phil

 

Maskell_Rascal
13 - Pulsar

Just realized that the Dynamic Rename is adding a '_2' to the end of every column name since it is naming them in positional order. This happens because you are duplicating a column name and Alteryx renames it with a '_2' to prevent confusion. You can add another Dynamic Rename tool right after the first one to remove this Suffix. 

 

Maskell_Rascal_0-1631646729944.png

 

swarajjoshi
7 - Meteor

@Maskell_Rascal  Thanks a lot, ya actually renaming was the correct option and I misinterpreted the question but thanks for understanding and providing me with a solution quickly. It really means a lot, thanks again. 

Maskell_Rascal
13 - Pulsar

Happy to help, and glad it worked for you!

Labels
Top Solution Authors