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:-
Code | Initial | 2021_08_01 | 2021_09_01 | 2021_10_01 | 2021_11_01 | 2021_12_01 | 2022_01_01 | 2021_02_01 |
111 | 0 | 1 | 58 | 100 | 8 | 54 | 7 | 9 |
112 | 600 | 10 | 5 | 1000 | 9 | 41 | 8 | 47 |
113 | 5 | 100 | 23 | 1987 | 10 | 758 | 1 | 48 |
114 | 1618 | 11 | 12 | 2021 | 888 | 55 | 6 | 49 |
Desired Output:-
Code | 2021_08_01 | 2021_09_01 | 2021_10_01 | 2021_11_01 | 2021_12_01 | 2022_01_01 | 2021_02_01 |
111 | 0 | 1 | 58 | 100 | 8 | 54 | 7 |
112 | 600 | 10 | 5 | 1000 | 9 | 41 | 8 |
113 | 5 | 100 | 23 | 1987 | 10 | 758 | 1 |
114 | 1618 | 11 | 12 | 2021 | 888 | 55 | 6 |
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
Solved! Go to Solution.
Hey @swarajjoshi what have you tried already?
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
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:
Output:
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
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 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.
Happy to help, and glad it worked for you!