Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic Header Rename

Kerry
6 - Meteoroid

I have a set of data that looks like this:

Total PanelF4Income Under $20000F6Etc.
01/03/14 - 01/02/1501/03/15 - 01/02/1601/03/14 - 01/02/1501/03/15 - 01/02/16Etc.
DataDataDataDataData
DataDataDataDataData

 

So, I would like to change each header name that contains "F*" to the column header before it. So that the header names will be different, I would then like to move up the dates that are below each header and either add that date as a prefix or suffix.

 

Thanks!

 

KT

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

Hi kerry,

 

Just for clarity would you also be able to post a copy of the desired output of your table given the initial table provided?

 

Ben

Kerry
6 - Meteoroid

Sure, here ya go:

Total Panel

01/02/14 - 01/02/15

Total Panel

01/03/15 - 01/02/16

Income Under $20000

01/02/14 - 01/02/15

Income Under $20000

01/03/15 - 01/02/16

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

Data

 

Again, I don't care if the Dates come before or after the Header Name, just so they are included.

Thanks!

 

KT

jdunkerley79
ACE Emeritus
ACE Emeritus

I think something like the following should work for you.

 

This is based on the Total Panel, F1, ... being the Column headers

 

- Sample the input to keep just one row

- Use a Transpose tool to rotate to Row based Name, Value

- Use a Multi-Row Formula to replace the F* names and concatenate the Value on the end:

IIF(Regex_Match([Name],"F\d+"),[Row-1:Name],[Name])+ ' ' + [Value]

- Skip 1 row of the input data

- Use a positional dynamic rename to rename the data having skipped one row

2017-06-07_07-25-48.jpg

 

Sample workflow attached

2017-06-07_07-33-43.jpg

 

Labels
Top Solution Authors