Alteryx Designer Desktop Discussions

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

Concatenate all of all values in field 1 to each value in field 2

thrnma
7 - Meteor

Hello,

 

I would like to get every combination of the following data:

CountryName
FranceKyle
GermanyChloe
SpainJohn

 

so it looks like this:

Country Name
France Kyle
France Chloe
France John
Germany Kyle
Germany Chloe
Germany John
Spain Kyle
Spain Chloe
Spain John

 

I tried using cross tab to get the countries along the top but then it leaves it as this:

 FranceGermanySpain
Kyle   
Chloe   
John   

 

I feel like I am on the right track, but I need those blanks to be populated and then for them to all be in one column, like the 2nd table example. It also needs to be a scalable and flexible solution as in my actual data set, the numbers in both fields will vary

 

Thank you in advance for your help!

 

7 REPLIES 7
AngelosPachis
16 - Nebula

Hi @thrnma ,

 

You will have to use the Append Fields tool for that. Check the attached workflow please, I think it will give you what you are looking for

 

Screenshot 2020-10-16 133658.jpg

MarqueeCrew
20 - Arcturus
20 - Arcturus

@thrnma ,

 

if you take the data into an append field tool, you can read column 1 as target and column 2 as source and get the results by then creating a formula of:

 

[field1] + " " + [field2]

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
thrnma
7 - Meteor

@AngelosPachis 

 

Thank you for this solution.

 

I have tried putting it into my workflow but my results come up like this:

Country Name
France Kyle
France Kyle
France Kyle
Germany Chloe
Germany Chloe
Germany Chloe
Spain John
Spain John
Spain John

 

Do you know why this is happening?

atcodedog05
22 - Nova
22 - Nova

Hi @thrnma 

 

Make sure you append tool is configured like below.

atcodedog05_0-1602853715066.png

Country from target and name from source

 

In your scenario its seems both are from same(either both target or both source)

 

Hope this helps 🙂

thrnma
7 - Meteor

@atcodedog05 

 

Brilliant, thank you for your help.

 

And thank you everyone! Works perfectly

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @thrnma 

 

Cheers and Happy Analyzing 😀

AngelosPachis
16 - Nebula

I think it's because the Append fields tool is misconfigured. Could you please make sure that the boxes are selected as shown in the following image

 

Screenshot 2020-10-16 141310.jpg

Labels