Alteryx Designer Desktop Discussions

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

Combining rows with no reference into a single cell

robin2021
5 - Atom

Hi all

 

Greetings from the UK Midlands!

 

Really hope you can help with this...

 

I have the following data in an Excel (note the random spacing):

Account numberComment
xxxx9999issues with rec1 revert fo X for guidance
 24 May - transaction x failed,
 overpayment to sam $100
  
  
  
xxxx7985No issues
  
xxxx3241Rec complete no issue
 Escalate - $8000 27 July no history?
  
  
xxxx4963Transaction history sent for audit
 Reconciled - no issue
 Escalate to company sec - FX transaction
 Escalate to company sec - FX transaction
 Query charges with bank
  
xxxx4898no issues

 

and I am trying to write a script to combine the comments into one cell against the account number... the output would look something like this:

 

Account numberComment
xxxx9999issues with rec1 revert fo X for guidance, 24 May - transaction x failed, overpayment to sam $100
xxxx7985No issues
xxxx3241Rec complete no issue, Escalate - $8000 27 July no history?
xxxx4963Transaction history sent for audit, Reconciled - no issue, Escalate to controller - FX transaction, Escalate to controller - FX transaction, Query charges with bank
xxxx4898no issues

 

I've been going round in circles with this all afternoon, so any help would be greatly appreciated...

 

Many thanks :)

4 REPLIES 4
sp210708
8 - Asteroid

Probably a few different ways to do this,

Can you provide the excel document? that would be helpful,

 

Shane

DataNath
17 - Castor

Hey @robin2021, I'd first of all use a Multi-Row Formula tool in order to fill down the missing account numbers, until a new one is found. After that, we can simply remove the empty rows and use a Summarize tool in order to Concatenate all of the (currently) scattered comments, into a single cell, separated by a comma:

 

10.png

 

Hope this helps!

flying008
14 - Magnetar

Hi, @robin2021 

 

As your full want :

 

录制_2023_07_14_08_36_24_950.gif

 

Input 
Account numberComment
xxxx9999issues with rec1 revert fo X for guidance
 24 May - transaction x failed,
 overpayment to sam $100
  
  
  
xxxx7985No issues
  
xxxx3241Rec complete no issue
 Escalate - $8000 27 July no history?
  
  
xxxx4963Transaction history sent for audit
 Reconciled - no issue
 Escalate to company sec - FX transaction
 Escalate to company sec - FX transaction
 Query charges with bank
  
xxxx4898no issues
  
Output 
Account numberComment
xxxx9999issues with rec1 revert fo X for guidance,24 May - transaction x failed,overpayment to sam $100
xxxx7985No issues
xxxx3241Rec complete no issue,Escalate - $8000 27 July no history?
xxxx4963Transaction history sent for audit,Reconciled - no issue,Escalate to company sec - FX transaction,Escalate to company sec - FX transaction,Query charges with bank
xxxx4898no issues

 

BTW, if you don't care the row order and multiple comma like ',,' in string after join,  you can use brief solution of @DataNath .

robin2021
5 - Atom

Hi @DataNath & @flying008 

 

Many thanks for responding on this... both solutions worked really well and I was able to integrate it into the larger script i am working on.

 

Looking back on yesterdays afternoon of 'pain' - it was the summarize tool which I was missing! 

 

Thanks again! 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels