Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Blending multi-row headers

markp201
8 - Asteroid

I'm still a bit of a noob with macros but I ran across a datasource (excel - what else causes more problems?) which had the classic spanning headers thusly...

 

Capture.JPG

 

So I came up with this little macro to create a concatenated header.   The only input is the number of header rows.

 

Capture.JPG

 

In order for this to work, the input needs to have "First Row Contains Data" Checked to get the generic column names.  Is there a way to set this in the macro?

 

Capture.JPG

 

After which you can join this back to the data and use the dynamic rename

 

It's not perfect - this is excel where anything not only can happen but will happen.  You can easily have a duplicate column name so Alteryx will make this unique.

Like I said - one of my first macros but learning more each day.  Thanks for viewing

 

1 REPLY 1
pcatterson
11 - Bolide

I'm not sure I know what you mean by "set this in the macro".

 

If you mean that you want to use a 'Data Input' tool instead of the 'Macro Input' tool as the start of the workflow, then there is a way.  You could connect the 'Data Input' tool with a 'Check Box' and an 'Action'.  If you want to stay with the 'Macro Input' then the data arrives to the macro already with this selection chosen or not chosen.

Labels