Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic column names with months

sophievanluin
7 - Meteor

Hi there,

 

I would like to build a workflow where the column names include the the following months:

  • December from last year (e.g., Dec 21)
  • Full current year (e.g., Jan 22 till Dec 22)
  • Full next year (e.g., Jan 23 till Dec 23)

However, I want the column names to automatically change over time.

So, I want that the column names to automatically change to Dec 22, Jan 23-Dec 23 and Jan 24-Dec next year.

 

How do I integrate this in my workflow?

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @sophievanluin 

 

Here is how you can do it.

 

Input:

atcodedog05_0-1643885877638.png

 

Workflow:

atcodedog05_1-1643885893903.png

 

Hope this helps : )

RolandSchubert
16 - Nebula
16 - Nebula

Hi @sophievanluin ,

 

using a Dynamic Rename tool could solve your problem:

 

2022-02-03_12-09-33.jpg

 

The assumption is, that you name your columns "LY", "Jan CY" - "Dec  CY" and "Jan NY" - "Dec NY", thereby using a kind of placeholder for the year. The Dynamic Rename tool can replace these placeholders by the year.

 

Let me know if it works for you.

 

Best,

 

Roland

 

sophievanluin
7 - Meteor

Hi @RolandSchubert 

 

That's exactly what I mean, thank you very much!

 

I do have another question, how do I make sure that the data in the rows will still be applicable to the same columns if the columns will be named differently every year?

 

E.g., if I now use a formula tool for Dec 21, it will not be applicable to Dec 22 next year.

 

 

 

atcodedog05
22 - Nova
22 - Nova

-

RolandSchubert
16 - Nebula
16 - Nebula

Hi @sophievanluin ,

 

a solution could be to rename the columns as a last step of the workflow, e.g. "Jan 23" as a field name/column header would appear only in your output, for a steps before the name would be "Jan NY" and in all formulas or summarize tools, [Jan FY] would be used.

 

Do you think this would be work in your workflow?

 

Best,

 

Roland  

Labels
Top Solution Authors