I have columns name 2024-1, 2024-2,...., 2024-12, 2025-1, 2025-2, ....., 2025-12. I want have 12 columns in output
Output column1: [2025-1] - [2024-1]
Output column2: [2025-2] - [2024-2]
.......
Output column12: [2025-12] - [2024-12]
I am trying multifield formula tool but I couldn't achieve the result.
@Ronit_Gupta
Can you provide a sample dataset for input and output?
@Ronit_Gupta
You can do it with the normal Formula tool but then it will not dynamic automation, as it will work only for this year.
If you want it to be dynamic you will need first to rename the headers
Connect a Field Info tool and then a RecordID Tool, along as your files containing only 24 headers for the months, you will always have 24 static headers that you can use to rename your fields, then set these header in Formula tool and you have solve the issue
Hi, @Ronit_Gupta
There is a full dynamic resolution for you:
Input | |||||||||||||||||||||||
2024-1 | 2024-2 | 2024-3 | 2024-4 | 2024-5 | 2024-6 | 2024-7 | 2024-8 | 2024-9 | 2024-10 | 2024-11 | 2024-12 | 2025-1 | 2025-2 | 2025-3 | 2025-4 | 2025-5 | 2025-6 | 2025-7 | 2025-8 | 2025-9 | 2025-10 | 2025-11 | 2025-12 |
10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 | 110 | 120 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
Output | |||||||||||||||||||||||
[2025-1] - [2024-1] | [2025-2] - [2024-2] | [2025-3] - [2024-3] | [2025-4] - [2024-4] | [2025-5] - [2024-5] | [2025-6] - [2024-6] | [2025-7] - [2024-7] | [2025-8] - [2024-8] | [2025-9] - [2024-9] | [2025-10] - [2024-10] | [2025-11] - [2024-11] | [2025-12] - [2024-12] | ||||||||||||
-9 | -18 | -27 | -36 | -45 | -54 | -63 | -72 | -81 | -90 | -99 | -108 |
@Ronit_Gupta
I tried another approach as below.
The point is to seperate the Year and Month from your data input then use the Summarize tool to get the desired output and moditied the header name with Dynamic Rename tool.