Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Merge Rows and Combine Columns

SaiJanani
7 - Meteor

Hello, 

 

I am trying to achieve the below output. Lot of things need to happen.

 

1. Merge current row with the below row and display the output in the below row for Col B, Col C and Col D 

2. Merge Col E and Col F where I want to keep the 1st,3rd,5th row in Col F but want to merge and copy the data from Col E to Col F on the the 2nd, 4th, 6th row 

3. Same as above for Col H and Col I, but Col I doesn't have data on the 1st row

 

Below are the Input and Output:

 

Sample Input:

 

Col ACol BCol CCol DCol ECol FCol GCol HCol I
ABC1231123648963ABCBMN428 
DEF1871123648963542753428421
GHF19751789324423XYZERTS157LOP
HML32151789324423698658157357
LKH4565654148875PQRSWER637GHF
LMB87956541488756986321637169

 

 

 

Sample Output:

 

Col ACol BCol CCol DCol E/Col FCol GCol H/Col I
ABC123   ABCBMN 
DEF1871123648963753428
GHF197   XYZERTSLOP
HML32151789324423658157
LKH456   PQRSWERGHF
LMB87956541488756321637
2 REPLIES 2
AngelosPachis
16 - Nebula

Hi @SaiJanani ,

 

Here's a workflow that does what you're looking for. The trick for the requirements for columns B-D is to group on all distinct values in those columns and also use the Last expression for column A in the summarize tool. For columns E/F and H/I, you will have to identify which rows are odd/even (you can do that with the modulo function) and then apply the logic with an IF statement

 

AngelosPachis_1-1642959139688.png

 

Hope that helps,

Angelos

SaiJanani
7 - Meteor

@AngelosPachis - worked like a charm, thank you

Labels