Morning All,
Attached is a demo csv, some data is demo'd below
Date | Purchase | Type | Amount kg |
01/05/2021 | Bananas | Fruit | 0.9 |
01/05/2021 | Apples | Fruit | 0.5 |
01/05/2021 | Strawberries | Fruit | 0.2 |
01/05/2021 | Kiwis | Fruit | 0.4 |
01/05/2021 | Limes | Fruit | 0.6 |
01/05/2021 | Potatoes | Veg | 0.8 |
01/05/2021 | Leeks | Veg | 0.2 |
01/05/2021 | Cauliflower | Veg | 0.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:
Date | Purchase | Type | Amount kg |
01/05/2021 | Fruit | Fruit | 2.6 |
01/05/2021 | Veg | Veg | 1.5 |
01/05/2021 | Bananas | Fruit | 0.9 |
01/05/2021 | Apples | Fruit | 0.5 |
01/05/2021 | Strawberries | Fruit | 0.2 |
01/05/2021 | Kiwis | Fruit | 0.4 |
01/05/2021 | Limes | Fruit | 0.6 |
01/05/2021 | Potatoes | Veg | 0.8 |
01/05/2021 | Leeks | Veg | 0.2 |
01/05/2021 | Cauliflower | Veg | 0.5 |
Many thanks
Solved! Go to Solution.
Hi @Bobbins
Here is how you can do it.
Workflow:
1. Using summarize tool groupby date, type and get sum of amtkg
2. Using union tool to add the summarized row.
Hope this helps : )
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 !
Oh i feel so dumb, thank you! 🙃
Dam! i guess i missed out again for not using the input file 😅
Hi @Bobbins
This would be my updated workflow.
Hope this helps : )
Don't feel dumb ! We all went through that kind of stuff ! 🙂