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

Concatenating Rows of Data

Deano478
12 - Quasar

Hi All,

 

I'm currently facing what might be a simple issue that I just cant seem to solve. I have data like so:

Column 1Column 2Column 3Column 4
SalaryTestBonusesHoliday
 Rate @2% Test Rate @4%

 

And what I need to do is produce an output like this I've attempted a few different approaches all of which gave me no luck:

Column 1Column 2Column 3Column 4
SalaryTest Rate @ 2 %BonusesHoliday Test Rate @4%

 

I know this is possible but I can't seem to figure it out.

 

Cheers for any help in advance

4 REPLIES 4
DataNath
17 - Castor
17 - Castor

Hi @Deano478, I'm guessing this is repeating and doesn't just happen for 2 rows? If so, here's how I'd go about this:

 

1) Assign a RecordID based on one of alternating columns being blank/not

2) Transpose our data, grouping on this RecordID

3) Re-Cross Tab our data, once again grouped by this ID and concatenating our values

4) Simple Dynamic Rename to tidy up underscores in field names

 

Start:

 

20.png

 

End:

 

21.png

Deano478
12 - Quasar

@DataNath thats worked like a charm I knew I was just over complicating things many thanks to you 

Deano478
12 - Quasar

Hey @DataNath  sorry about this I just came across one issue for certain columns I have data like so is it possible to adopt the current solution to work on them too? The data looks like so:

 

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10
SalaryTestBonusesHolidayPILONEEERAdvanceVHIDB
 Rate @2% Test Rate @4% PRSAPRSA  Cheque
    P023D001D002D003D004D005

 

 

I need to again get it like so:

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8Column 9Column 10
SalaryTest Rate @2%BonusesHoliday Test Rate @4%PILON P023EE PRSA D001ER PRSA D002Advance D003VHI D004DB Cheque D005

 

I gave it a good stab trying to adapt your solution but Tripped over myself again.

 

My apologies for asking this follow up question only now

 

DataNath
17 - Castor
17 - Castor

Hey @Deano478, what does your result look like? I've just ran this through my workflow and get the expected output:

 

22.png

 

The one thing it may be is that your fields aren't null/empty but have a space. If that's the case you could just use a Formula tool and trim whitespace from the first column before the Multi-Row.

Labels