Summing the rows based on condition
- 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 All,
I am struggling to get to the solution for below scenario:
I am trying to sum up the Quantity based on the combination of ID and Sub Account,
Use Case: If ID and Sub Account combination is same then sum the Quantity, if the combination is not same then do not sum the Quantity as is.
To achieve this I have used Summarize tool i have group by ID , Sub Account , Description and Date and used Sum on 'Quantity' but somehow its summing up the whole Quantity ( See False Output)
Can anyone have any idea what I am doing wrong and what can be done to handle this? Any help is much appreciated.
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The issue is your group by fields. You want to do the group by on ID and Sub Account. This will control what each row represents - it will be every unique combination of whatever is a group by field. From there, you'd do a sum of quantity. For Description and Date, you'd need to choose how you want to bring those values in. I suggest taking a "first" in your case.
