Alteryx Designer Desktop Discussions

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

Parent-Child: Quantity assignment

Meoth
8 - Asteroid

Hi, 

 

I am working on creating Parent-Child flow in Alteryx. In the Input, the "Quantity" can be under Child. But I need the "Quantity" to be under "Base child/First child(child without -)".

 

There are two special cases here, 

1. There could be as many Children under each Parent

2. There could be no Base child/First child (child without -)

 

Please see example Input and Output images

Input.PNGOutput.PNG

 

Any help is appreciated!. Many Thanks!

3 REPLIES 3
OTrieger
12 - Quasar

Hello @Meoth 

I'm sure that there are several ways how to do it, one of them will be using Summarize tool.

Add a record ID . Group the data on Parent and then Sum up Quantity, First Act, First Child, First RecordID now you will have the parent with Quantity. 

Just ensure that the naming of the fields are the same, so delete Sum, First etc..

Join the output of the Summarize Tool with the original data, Using the RecordID, in the joint tool remove all the items that comes from the Right. Connect R output to a Formula tool and set 0 for Quantity. Now union J and R. Add a Sort Tool and you will have the output that you need.

Meoth
8 - Asteroid

@OTrieger , Thank you so much for your timely help. It worked!

OTrieger
12 - Quasar

😎

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels