Alteryx Designer Desktop Discussions

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

Rename Column Header to date from another column

JSheppard98
8 - Asteroid

Hi there, I have the current formula to rename my transaction amount column "datetimeformat(datetimeadd(datetimetoday(), -1, 'days'), '%Y-%m-%d')". However, if I was to run this on Monday, it would bring back a weekend date.

 

So, since my report with the transaction amount in, has a column of "Value Date" with the working day prior date, I was wondering if there is a formula I can use in dynamic rename tool to take the date and then replace "Transaction Amount" header with the "Value Date" ie 1/16/2023? 


Thanks

 

JSheppard98_0-1673948484826.png

 

8 REPLIES 8
FinnCharlton
13 - Pulsar

Can you use the same formula that calculates "Value Date" in the dynamic rename?

JSheppard98
8 - Asteroid

Apologies, the value date column is not formula that is just raw from the input data file itself sadly.

ShankerV
17 - Castor

Hi @JSheppard98 

 

Please find the expected output.

ShankerV_0-1673949066966.png

 

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @JSheppard98 

 

Step 1: Input as shown in the Dataset sample.

 

ShankerV_0-1673949207375.png

 

Step 2: Select tool

ShankerV_1-1673949227630.pngShankerV_2-1673949249614.png

 

Step 3: Sample tool

 

ShankerV_3-1673949272331.png

ShankerV_4-1673949281591.png

 

Many thanks

Shanker V

 

 

 

 

 

binuacs
20 - Arcturus

@JSheppard98 One way of doing this with the dynamic rename tool

 

binuacs_0-1673949525972.png

 

 

ShankerV
17 - Castor

Hi @JSheppard98 

 

Step 4: Formula tool.

 

ShankerV_0-1673949342916.png

ShankerV_1-1673949350836.png

 

Step 5: Dynamic rename

ShankerV_2-1673949379581.png

ShankerV_3-1673949428156.png

 

 

Output expected:

 

ShankerV_4-1673949453432.png

 

Feel free to mark the solution of the post which helped to resolve the issue, so similar issues faced by other community members in future can be helpful to refer the solution.

 

Many thanks

Shanker V

JSheppard98
8 - Asteroid

This is perfect, and no need to be dynamic either as the input data will change per value date so this should still all work for a different day ran due to input data changing/updating value date with previous day. Thanks so much!

ShankerV
17 - Castor

Hi @JSheppard98 

 

You can also eliminate the Sample tool, it will deliver you the same result.

If the data is huge, sample tool will help to fasten the workflow as it limits to 1st record.

 

Feel free to do the modifications in your workflow as both will give the same output.

 

ShankerV_0-1673950467460.png

 

Many thanks

Shanker V

Labels