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

Dynamic Rename Tool to Rename columns with today's and tomorrow's dates

Anjankumar2021
8 - Asteroid

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:

 

ABC16-Sep17-Sep18-Sep
1-3000000-3000000-3000000
2-3000000-3000000-3000000
43878300038783000-3000000

 

Required Output:

 

ABC16-sepT1T2
1-3000000-3000000-3000000
2-3000000-3000000-3000000
43878300038783000-3000000

 

4 REPLIES 4
jrlindem
11 - Bolide

@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:

jrlindem_0-1758028755007.png
Hope that helps and gives you a direction to pursue,

 

-Jay

 

binuacs
21 - Polaris

@Anjankumar2021 one way of doing this

binuacs_0-1758032446189.png

 

jrlindem
11 - Bolide

@binuacs nice!  I keep forgetting about dynamic rename expressions.  Thanks for sharing this.  Curious, does this account for the omission of weekends too?  -Jay

binuacs
21 - Polaris

@jrlindem I updated the workflow which will take care of the omission of weekends as well

input

binuacs_1-1758035273104.png

output

 

binuacs_2-1758036812279.png

 

Labels
Top Solution Authors