We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Add in summary rows?

Bobbins
8 - Asteroid

Morning All,

Attached is a demo csv, some data is demo'd below

 

DatePurchaseTypeAmount kg
01/05/2021BananasFruit0.9
01/05/2021ApplesFruit0.5
01/05/2021StrawberriesFruit0.2
01/05/2021KiwisFruit0.4
01/05/2021LimesFruit0.6
01/05/2021PotatoesVeg0.8
01/05/2021LeeksVeg0.2
01/05/2021CauliflowerVeg0.5

 

What I would like to do is for each date, have a "Purchase" where all the different types are added together, like the following and added to the data, so it would look like this:

 

DatePurchaseTypeAmount kg
01/05/2021FruitFruit2.6
01/05/2021VegVeg1.5
01/05/2021BananasFruit0.9
01/05/2021ApplesFruit0.5
01/05/2021StrawberriesFruit0.2
01/05/2021KiwisFruit0.4
01/05/2021LimesFruit0.6
01/05/2021PotatoesVeg0.8
01/05/2021LeeksVeg0.2
01/05/2021CauliflowerVeg0.5

 

Many thanks

5 REPLIES 5
atcodedog05
22 - Nova
22 - Nova

Hi @Bobbins 

 

Here is how you can do it. 

 

Workflow:

atcodedog05_0-1628157885475.png

 

1. Using summarize tool groupby date, type and get sum of amtkg 

2. Using union tool to add the summarized row.

 

 

Hope this helps : )

 

Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @Bobbins ,

 

You can do it summarizing your data by type for each date then union that result to your original data.

 

Workflow attached. Tell me if it's okay !

Bobbins
8 - Asteroid

Oh i feel so dumb, thank you! 🙃

atcodedog05
22 - Nova
22 - Nova

Dam! i guess i missed out again for not using the input file 😅

 

Hi @Bobbins 

 

This would be my updated workflow.

 

atcodedog05_0-1628158219759.png

 

Hope this helps : )

 

Jean-Balteryx
16 - Nebula
16 - Nebula

Don't feel dumb ! We all went through that kind of stuff ! 🙂

Labels
Top Solution Authors