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

Dynamically change column headers each day ran

JSheppard98
8 - Asteroid

Hi there,

 

I am wanting to try and change the below which would be column headers for my input data. This would ideally be ran daily, and columns A and B would be the current day, columns C and D would be the next working day (+1 from current day, unsure how to get around skipping weekends as would only want to count "workdays" as Mon-Fri) and then Column E and F (+1 from columns C and D).

 

Is this possible in Alteryx? As I am able to use "DateTimeFormat(DateTimeToday(),'%d/%m')+' Balance'" for columns A and B to rename those but unsure how to proceed with the other columns.

 

Please let me know if you require anything further.

 

JSheppard98_0-1673007597531.png

 

16 REPLIES 16
JSheppard98
8 - Asteroid

Many thanks for the help so far. This also seems a viable option, however I seem to be getting multiple field name duplicates resulting in "2" at the end, also any way to shift start the column headers on "C" if that makes sense? As in column A and B in my actual input data, I already have column and headers unrelated to dates here. Thanks so much.

ShankerV
17 - Castor

Hi @JSheppard98 

 

Yes, Its possible.

 

Please see my input below.

 

ShankerV_0-1673010305423.png

 

Output:

 

ShankerV_1-1673010403998.png

 

If this helps, please like this post and mark it as a solution. If you have any other questions, please let us know.

 

Many thanks

Shanker V

 

ShankerV
17 - Castor

Hi @JSheppard98 

 

You can achieve the rename after leaving the first 2 columns by below.

 

ShankerV_0-1673010554705.png

 

Many thanks

Shanker V

JSheppard98
8 - Asteroid

This is what I'm after perfect, could you post the steps potentially or send the workflow so I am able to see what you had selected/marked on the select, record ID and join tools if you get a chance please? Many thanks!

ShankerV
17 - Castor

Hi @JSheppard98 

 

Logic followed is splitting the first 2 columns

Then remaining all are send for dynamic rename.

 

Post rename both are joined with the join tool.

 

Added step : Record ID tool

 

ShankerV_0-1673010707264.png

 

ShankerV_1-1673010732423.png

 

Nest step: Select tool

 

ShankerV_2-1673010763262.png

 

ShankerV_3-1673010778569.png

 

Next step: Select tool

ShankerV_4-1673010810185.png

 

ShankerV_5-1673010819774.png

 

 

Nest step : Record ID tool

ShankerV_6-1673010846950.png

 

 

Final one is the Join tool,

 

ShankerV_7-1673010881780.png

 

 

Expected result:

ShankerV_8-1673010900513.png

If this helps, please like this post and mark it as a solution. If you have any other questions, please let us know.

 

Many thanks

Shanker V

 

 

 

 

 

JSheppard98
8 - Asteroid

Sorry to be a pain, but was still getting the "2" at the end of some column headers and also instead of the +1 and +2 days columns to be movements and closing balance like below they aren't. Unsure where abouts I am going wrong RE the join tool part 

 

JSheppard98_0-1673018462995.png

 

ShankerV
17 - Castor

Hi @JSheppard98 

 

Sorry to be a pain, but was still getting the "2" at the end of some column headers and also instead of the +1 and +2 days columns to be movements and closing balance like below they aren't. Unsure where abouts I am going wrong RE the join tool part

 

I am unable to understand the above, can you please explain little elaborately.

Happy to help!!!!

 

Many thanks

Shanker V

Labels
Top Solution Authors