Hi Team / @binuacs
could someone assist on the below query.
with the help of Dynamic rename tool i want to change column name tomorrow date 17-sep to string "T1" and day after tomorrow date 18-sep to string "T2".
i want to skip weekends (SAT and SUN).
Input:
ABC | 16-Sep | 17-Sep | 18-Sep |
1 | -3000000 | -3000000 | -3000000 |
2 | -3000000 | -3000000 | -3000000 |
4 | 38783000 | 38783000 | -3000000 |
Required Output:
ABC | 16-sep | T1 | T2 |
1 | -3000000 | -3000000 | -3000000 |
2 | -3000000 | -3000000 | -3000000 |
4 | 38783000 | 38783000 | -3000000 |
Solved! Go to Solution.
@Anjankumar2021 interesting problem. I've built out an illustrative workflow as a solution to your need. I think it should scale okay. I short-handed the actual values but the concept is still there so don't be thrown off by the differing numbers.
Top leg is transpose/cross-tab so we can "fix" the headers to actual dates so that they can be constrained to weekdays only.
The bottom leg is handling the field names, converting them to actual dates, flagging weekends, and removing them.
The core part of this is using the multi-row formula tool to sequence the "T" values and then bringing them back in using dynamic rename:
Hope that helps and gives you a direction to pursue,
-Jay
@binuacs nice! I keep forgetting about dynamic rename expressions. Thanks for sharing this. Curious, does this account for the omission of weekends too? -Jay
@jrlindem I updated the workflow which will take care of the omission of weekends as well
input
output