Cumulative sum based on the multiple id.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Team,
Hope you are well. I need help.
I need to sum the values of a column based on the id. Final output column is marked in yellow.
Thanks ,
Sri
Solved! Go to Solution.
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
it will always be on 2 lines.
it would be ideal for you to send an example with more sample data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@geraldo : Thank you . Just attached the sample data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sriniprad08 - we need more information. Because based on what you provided, I can only assume that it will always be for the Max line of the 2nd column, and the sum of values of the first column - all provided by the Group of ID. Since this is just an assumption, the workflow I have here may not account for all your needs - please be mindful of this.
 
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @caltang ,
Thank you for the solution. Appreciate it. I have attached the updated data.
Please let me know if this looks ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @sriniprad08,
I’ve already attached the workflow for you - replace the text input with your new data and run it. You should get the result you desire.
If not, you can add a RecordID from the start and to the end, and join back using a Join Tool to get your desired output.
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @caltang ,
Thank you.I tried with the but its giving different results.
sorry may be i am missing something. Do i need to add record id at the end of the flow?
Cheers,
Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes, you just need to add a RecordID Tool immediately after the Input Tool.
Then, in the Summarize tool, you need to add the Max RecordID, and you will be able to have your values towards the end.
Once done, you can perform a Left Outer Join with the main data on the left and the new rows of data on the right. (Join Tool + Union Tool).
I am currently going to bed soon, try this on your own and you should be able to get it. Otherwise I can help you out tomorrow.
thanks,
Calvin
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @geraldo ,
Perfect. Thank you. Great one challenge sorry which i forgot to mention.
There is another column called sub_num. So the flow as to take into consideration num and sub_num.
Please find attached and let me know how to go about it,
Cheers,
Sri
