Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

How to combine multiple header rows into one

HenrietteH
Alteryx
Alteryx
Created

Sometimes, data will come with multiple header lines, for example, year and quarter might be broken into two rows, like this:

9-15-2016 3-00-57 PM.png

That is not very helpful when you are trying to analyze your data.

You could use a Select Tool and type in new names OR you could do a few transformations and use the Dynamic Rename Tool to merge the rows dynamically, so you are prepared when 2017 rolls around the corner and they start adding new columns to your file!

To fix data that looks like the above, westart with the Sample Tool to split thedata into two data streams - one with just the values and one with the header information. Then, we transpose the data to let us fill in the missing years and use the Summarize Tool to concatenate the resulting field values:

9-15-2016 2-58-32 PM.png

Now we can use the header lookup we created as a right input into a DynamicRename Tool using the "Take Field Names from Right Input of Rows" option and selecting "Name" as the old field name and Concat Value as the new combined field name.

See the attached workflow for details of tool configurations.

Attachments
Comments
ddiesel
13 - Pulsar
13 - Pulsar

Very helpful! Thank you for writing this article!

NJT
11 - Bolide

And this works even if you have blanks at the top of the spreadsheet and headers on three different rows, you just have to add another Sample tool which was my problem. Thanks for sharing! 

tonypreece
10 - Fireball

Great tutorial @HenrietteH, thank you. I was about 80% towards making this work before I gave in and looked for help!

MikeLR
8 - Asteroid

Thanks @HenrietteH, this was really useful!

muhammsyed
5 - Atom

thanks a lot @HenrietteH . it really helped.

la_alonso
5 - Atom

great solution! thanks for sharing