We are aware of an issue with the Search bar. Please use Advanced search for the time being while we troubleshoot. Thanks for your patience as we work on improving the community!

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Combine two datasets but just populate the first line

shravanvijayaprasad
8 - Asteroid

I want to join two simple tables (with no join field), I just want it populated in the first line it sees a new ID

 

I have a table that looks like below

IDNameAccount
1xxx100
1xxx200
2yyy

100

2yyy200

 

and I have another value in another table that is just like this

Amount
1000

 

I want my output to look like below,

IDNameAccountAmount
1xxx1001000
1xxx200 
2yyy1001000
2yyy200 
3 REPLIES 3
grossal
14 - Magnetar
14 - Magnetar

Hi @shravanvijayaprasad,

 

here is a quick way to do it:

 

grossal_0-1585244535943.png

 

What happens:

1) I joined the amount to EVERY row using the Append Fields Tool.

2) I use a Multi-Row-Formula to replace it with 0

3) I replace 0 with Null() using a simple Formula    [I can't do this before, because I check if the values are null to find the first row)

 

I'll attach my workflow. Let me know if it helps.

 

Best 

Alex

shravanvijayaprasad
8 - Asteroid

@grossal what if they are not sorted and I do not want to sort them?

grossal
14 - Magnetar
14 - Magnetar

Add a Record ID, sort them, follow my attached workflow above, and resort them to record numbers. This way you keep the original sort.

Labels