Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Alteryx is here to help you solve your biggest data challenges. Read about the new Virtual Solution Center here.

Combine two datasets but just populate the first line

Highlighted
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 
Highlighted
12 - Quasar

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

Highlighted
8 - Asteroid

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

Highlighted
12 - Quasar

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