community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Dynamic Transpose - Identify specific Columns for Transpose through a Macro

Atom

Hi everyone, I have the following challenge. I have various spreadsheets that have various columns. The common theme is the following:

 

Data Source A

Data AData B2018/01/012018/02/012018/03/01Data C

 

Data Source B

Data A2017/12/012018/01/012018/02/012018/03/01Data C

 

I'm trying to create a workflow / macro that will pick up the dates and only Transpose those through a macro.

 

I've tried using a "Field Info" tool, and then use a "Date Time" to identify the columns that contain a date. I'm struggling to take that information and create a macro that can use that.

 

Any help would be greatly appreciated.

Alteryx Certified Partner
Alteryx Certified Partner
Hi!

I've created a tool for this purpose called the regex transpose which is available in the gallery....

https://gallery.alteryx.com/#!app/RegEx-Transpose/5a967abdf499c7166cab1c53

In the background essentially I record ID the data stream and then use a dynamic select tool to only keep columns that are either the record ID or match the regex statement provided by the user, and then pivot any columns that match around the ID.

As a separate stream I also select the record ID and any fields that do not match the criteria and then join these to the first stream after the transpose.

Ben
Labels