Alteryx Designer Discussions

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

General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!

SOLVED

Creating Incremental New Row on Previous Row Data

scsh4
7 - Meteor

Good Afternoon!

 

I'm currently trying to determine a solution for the following scenario. In the table below, you will find that I have multiple orders, with multiple line items in each order, and dollar values in multiple columns.

 

OrderNoLineItemQtyUnitCostAddCost1AddCost2AddCost3AddCost4AddCost5TotalCostDescription
1001145.252.2510.255.503.501.5044Widget1
10012125.501.252.253.501.002.0035.50Widget2
100132101.0012.005.001.001.0040Widget3
1002115001500065Widget4
100311125315002145Widget5

 

After running through the workflow, I need the table to look like this:

 

OrderNoLineItemQtyUnitCostAddCost1AddCost2AddCost3AddCost4AddCost5TotalCostDescription
1001145.252.2510.255.503.501.5044Widget1
10012125.501.252.253.501.002.0035.50Widget2
100132101.0012.005.001.001.0040Widget3
10014100000053AddedCost
1002115001500065Widget4
10022100000015AddedCost
100311125315002145Widget5
10032100000020AddedCost

 

The amount of orders and line items vary. I need for the order number to always match the order in which is it summing up and the line item to increment the next value, based on the order number and line item numbers. Any help is greatly appreciated.

Emil_Kos
15 - Aurora

Hi @scsh4,


Can you clarify how do you amend a total cost value?

 

The rest of the logic is ready for you

Emil_Kos_0-1614103287526.png

 

The output:

 

Emil_Kos_1-1614103317956.png

 

 

scsh4
7 - Meteor

I'm not sure that's performing as I expect it to. The quantity should always be 1 on the newly created line item, and the total cost should be the sum of the AddedCost1 through AddedCost5 of all line items on the order number.

messi007
12 - Quasar

@scsh4,

 

Please see below:

 

messi007_0-1614103714835.png

 

Attached the workflow,

 

Hope this helps,

Regards

 

Emil_Kos
15 - Aurora

Hi @scsh4,


My bad 😀

scsh4
7 - Meteor

I believe this does exactly what I need it to! Thanks for the super quick help, @messi007!

Labels