Alteryx Designer Desktop Discussions

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

Changic header to static

Tid14
8 - Asteroid

Hi, I am building a WF in which I have 3 headers namely

FY 2019

FY 2020

FY 2021

and I have to apply numeric formulas in these columns and then make it an app.

Here I want to use a logic where I can change these years Column to something static for applying the formula so when in next cycle the years will change to for eg:

FY 2020

FY 2021

FY 2022

we dont have to change anything in the WF and it picks from these headers only.

3 REPLIES 3
AngelosPachis
16 - Nebula

Hi @Tid14 ,

 

I would use a transpose tool in your app, so instead of getting the column headers as FY 2019 you get [Name] and [Value]. Then you can apply your logic referencing the values in the [Name] column.

 

Can't help further as I'm not sure about the logic, but if you provide an example then I'm sure we can help you build something.

 

Best,

Angelos

 

 

terry10
11 - Bolide

You can use the Dynamic Rename tool. In the tool configuration, set the rename mode to 'Formula'.

 

There are many formulas you could use. See attached workflow for one example using REGEX_replace to replace any instances of "FY " with nothing.  REGEX_Replace([_CurrentField_], 'FY\s', '')

 

This regex approach will not need to be changed when there are new columns for 2022, 2023, 2024...  If you aren't comfortable with regex, there are other ways to do this, but regex is awesome!

 

terry10_0-1631936460382.png

terry10_1-1631936493923.png

 

Does this answer your question?

 

 

ArtApa
Alteryx
Alteryx

Hi @Tid14 - Here is what you can do make your WF dynamic:

 

Dataset 1:

ArtApa_0-1631940615085.png

Dataset 2:

ArtApa_1-1631940649522.png

The WF adds +1 to all fields:

ArtApa_2-1631940705506.pngArtApa_3-1631940737774.png

 

Labels