Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to join data and have multiple results?

Inactive User
Not applicable

I have a list of journal entries on one side and I have a list accounts associated with each entry on the other. Is there a way to use the join tool to combine the accounts of each entry?

 

Ex:

List 1

JE00011100: Revenue
JE00011200: Cash
JE00014000: Accounts Receivable

JE0005

XX
JE0005XX

 

List 2

JE0001
JE0002
JE0003

 

Desired End Result

JE0001 1100: Revenue, 1200: Cash, 4000: Accounts Receivable
5 REPLIES 5
JohnJPS
15 - Aurora

Hi @Inactive User,

 

Do the join as usual, on the first column.  The middle output will have three rows, all for JE001. Then do a Cross Tab to concatenate the multiple rows into a single row. (See attachment for this done on your sample data).

 

Hope that helps!

John

Inactive User
Not applicable

Thanks for the reply!

 

I used your advice but the crosstab output something along the lines of the following...

 

JE Number

JE002JE003JE004JE005
JE002Revenue   
JE003 Revenue  
JE004  Revenue, Accounts Receivable 
JE005   Accounts Receivable

 

Is there a way to only have one column looking something like...

 

JE NumberAccounts
JE001Revenue
JE002Revenue
JE003Revenue, Accounts Receivable
JE004Accounts Receivable
JohnJPS
15 - Aurora

Understood, this can be done by adding a generic field label and using that as the Field Header in the Cross-Tab.  Please see the attached for the actual workflow.

echuong
8 - Asteroid

You can also achieve this by just using the summarize tool to streamline things. Just do a group by for the JE number and a concatenate for the description. You can change the default seperator to a comma with space (from a comma) for visual clarity.

JohnJPS
15 - Aurora

@echuong is absolutely spot on - recommend adding his solution to "Accepted."

 

 - John

Labels
Top Solution Authors