Alteryx Designer Desktop Discussions

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

Workflow setup, combining files

TheSAguy
7 - Meteor

Hi,

 

I have several files that I'd like to combine and concatenate a common field. 

Here is my input and desired output:

 

IN:

File 1 
Unique KeyCampaign
100Campaign A
101Campaign A
102Campaign A
107Campaign A
  
  
File 2 
Unique KeyCampaign
100Campaign B
101Campaign B
105Campaign B
110Campaign B
  
File 3 
Unique KeyCampaign
101Campaign C
107Campaign C

 

Output:

Unique KeyCampaignsNumber of Campaigns
100Campaign A, Campaign B2
101Campaign A, Campaign B, Campaign C3
102Campaign A1
105Campaign B1
107Campaign B, Campaign C2
110Campaign B1

 

As you can see from above, the unique key that had more than one Campaign on it got grouped together and also a count of the number of campaigns per key.

 

Is there an easy way to accomplish this?

Thanks.

 

4 REPLIES 4
steven_king
6 - Meteoroid

Hi @TheSAguy , the Summarize tool can solve this problem quickly. Combine the data with the Union tool and then configure a Summarize tool like the screenshot below. 

image.png

lynnesonneyrsm
8 - Asteroid

"Easy" is dependent on a few things. I've put together two solutions, one where the headers for each of the file 'sections' is consistent, one where they move around.

 

Please let me know if this helps!

TheSAguy
7 - Meteor

Great,

I've never used the concatenate on the Summarize tool.

Thanks for showing me!

lynnesonneyrsm
8 - Asteroid

One thing to note is that the Summarize tool concatenate function defaults to comma delimited, but can be changed. Additionally, it does not include spaces after the delimiter so I usually follow mine up with a replace([Field],",", ", ") in a formula tool for reader friendliness. 

Labels