Alteryx Designer Desktop Discussions

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

Combine 2 Column Header to Create a third Column Header

skotian1289
8 - Asteroid

Hello All,

 

I am pretty new with alteryx and I am still trying to figure out certain functions. I am trying to Combine 2 column headers to create a third column header, I am wondering if we can use REGEX however I am not able to move forward, see the sample data for reference. If anyone can help me resolve this would be helpful.

Current output:

File A1         File B1        Results       File A2        File B2          Results 

  1                   1                TRUE           3                   3               TRUE

  2                   3                FALSE          5                  5               TRUE

 

Expected output:

File A1         File B1        File A1 vs File B1       File A2        File B2          File A2 vs File B2 

  1                   1                      TRUE                       3                   3                TRUE

  2                   3                      FALSE                      5                  5                 TRUE

 

Thanks

2 REPLIES 2
jasperlch
12 - Quasar

Hi @skotian1289 

 

You could this by:

1. Use Field Info tool to list out all the fields (i.e. column headers) in one single column called Names

2. Use Record ID tool to give header a rowID

3. if your "combined" columns are always appearing in the rowID with a multiple of 3 (i.e. the 3rd, 6th, and 9th column etc....) then we could use Multi-Row Formula to create a new field name

4. Use a Dynamic Rename tool to rename the columns in the original datasetCapture.PNG

 

Hope this helps

RolandSchubert
16 - Nebula
16 - Nebula

Hi @skotian1289 ,

 

you could use a Transpose tool to convert the headers to field content, create a combined header using a Multi-Row Formula tool and apply the generated

using Dynamic Rename tool:

23-07-_2020_08-18-17.png

 

I've attached a sample workflow. Let me know if it works for you.

 

Best, Roland

Labels