Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Combining rows based on similar columns

RPeeters
7 - Meteor

I have created a workflow that creates a shipping report. Recently I noticed that 'revisions' were missing from the report. So I added the revisions column from my database into the workflow. However now I am wondering how I can combine the data.

 

Input:

OrderId - ItemId - Revision - Quantity

1 - 2 - 0 - 1

1 - 2 - 1 - 1

2 - 2 - 1 - 1

 

Desired output:

OrderId - ItemId - Revision - Quantity

1 - 2 - 0 -2

2 - 2 - 1 - 1

 

Revision is not important in the output, but quantity has to be added together based on OrderID + ItemID being equal but having different Revisions.

 

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @RPeeters you could use a summarize tool and group on OrderId and ItemID and then sum up the quantity field like below. 

 

Summarise_300819.PNG

RPeeters
7 - Meteor

@JS420 Thanks!

LordNeilLord
15 - Aurora

Hey @RPeeters 

 

Use the summarize tool, Group on OrderID, ItemID and Sum Quantity.

 

If you need Revision, you can use min, max, first, last whatever you need

Labels
Top Solution Authors