Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Concatenate Multiple Variable Fields

AndrewKwast
7 - Meteor

I have a group of accounts, and for each account, I need to concatenate three sets of numbers a variable number of times. Using the sample tables shown below, I need to combine each "Code", "Digit", and "Number" field for each account, into one "Code" field. There could be hundreds of "Codes" for any given account. In this sample, there is one account with one code, one account with six codes, and a bunch of other accounts with other code amounts.

 

How do I concatenate every three columns together and ensure that, if there were even more columns, any of these extra set of three numbers would be picked up in the next data input (e.g. if next account input had hundreds of codes)?

 

Sample Before:

AccountCode 1Digit 1Number 1Code 2Digit 2Number 2Code 3Digit 3Number 3Code 4Digit 4Number 4Code 5Digit 5Number 5Code 6Digit 6Number 6
7150902130715005985071506743807150902030715090214053066412   
7150902050715005983071509020            
50028674907150674330715005984071509020307150902130530664124071506743
5306641230715005984071506743307150902130715090203071509022   
53066413307150059830715067433071509021         
5308343630715005981071506743207150902130715090202071509022   
53083437607150059830715067433071509021         
530834383071500598               
7150902230715005984071506743307150902110715090203071509022   
7150059870715067433071500598            
715067433071500598507150902060715067433071509021      

 

Sample Desired Result:

AccountCode 1Code 2Code 3Code 4Code 5Code 6
7150902130715005985071506743807150902030715090214053066412 
7150902050715005983071509020    
50028674907150674330715005984071509020307150902130530664124071506743
5306641230715005984071506743307150902130715090203071509022 
53066413307150059830715067433071509021   
5308343630715005981071506743207150902130715090202071509022 
53083437607150059830715067433071509021   
530834383071500598     
7150902230715005984071506743307150902110715090203071509022 
7150059870715067433071500598    
715067433071500598507150902060715067433071509021  

 

The only solution I've thought of could be to have a template with a certain number of codes (e.g. 1000 codes) and just use the formula tool to create hundreds of formulas saying combine 1,2,3, then combine 4,5,6, then combine 7,8,9, etc. Is there an easier way to do this?

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@AndrewKwast I would suggest transposing your data. I've attached my solution

ponraj
13 - Pulsar

Here is the sample workflow for your case.  Hope this is helpful. 

 

WorkflowWorkflowResultsResults

Labels