SOLVED
sum value of row in case of number of row values are the same and & keep 1 line with sum
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
kimdelgadillo
7 - Meteor
‎04-17-2018
07:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
hello
looking for the following:
if the values project, id, period and costs are the same (bold lines) then the hours should be summed, and only 1 line kept with the sum of the hours (changed lines in bold in second table, please note only 1 line is retained with the sum)
input table
| PROJECT | id | period | HOURS | costs | FileName |
| DEB493 | 147485 | 1802 | -133 | 3250 | filename1 |
| DEB493 | 153126 | 1801 | -133 | 2550 | filename1 |
| DEB493 | 153126 | 1802 | -84 | 2550 | filename1 |
| UBS264 | 70946 | 1803 | 112 | 2700 | filename1 |
| UBS264 | 70946 | 1803 | 98 | 2700 | filename1 |
| UBS264 | 70946 | 1804 | 63 | 2700 | filename1 |
| UBS276 | 158018 | 1803 | 112 | 471 | filename1 |
| UBS276 | 158018 | 1804 | 112 | 471 | filename1 |
| UBS276 | 159035 | 1803 | 112 | 471 | filename1 |
| UBS276 | 159035 | 1803 | 12 | 471 | filename1 |
| UBS276 | 160460 | 1803 | 133 | 471 | filename1 |
| UBS276 | 160460 | 1804 | 56 | 471 | filename1 |
| ZYF425 | 147485 | 1801 | -56 | 3600 | filename1 |
| ZYF425 | 152155 | 1801 | -42 | 2900 | filename1 |
| ZYF425 | 152155 | 1802 | -28 | 2900 | filename1 |
| ZYF425 | 153038 | 1802 | -7 | 2900 | filename1 |
| ZYF426 | 90696 | 1801 | -95 | 4900 | filename1 |
| ZYF426 | 140960 | 1801 | -81 | 4900 | filename1 |
| ZYF426 | 149500 | 1801 | -77 | 3600 | filename1 |
| ZYF426 | 156428 | 1801 | -42 | 2900 | filename1 |
output table
| PROJECT | id | period | HOURS | costs | FileName |
| DEB493 | 147485 | 1802 | -133 | 3250 | filename1 |
| DEB493 | 153126 | 1801 | -217 | 2550 | filename1 |
| UBS264 | 70946 | 1803 | 210 | 2700 | filename1 |
| UBS264 | 70946 | 1804 | 63 | 2700 | filename1 |
| UBS276 | 158018 | 1803 | 112 | 471 | filename1 |
| UBS276 | 158018 | 1804 | 112 | 471 | filename1 |
| UBS276 | 159035 | 1803 | 124 | 471 | filename1 |
| UBS276 | 160460 | 1803 | 133 | 471 | filename1 |
| UBS276 | 160460 | 1804 | 56 | 471 | filename1 |
| ZYF425 | 147485 | 1801 | -56 | 3600 | filename1 |
| ZYF425 | 152155 | 1801 | -42 | 2900 | filename1 |
| ZYF425 | 152155 | 1802 | -28 | 2900 | filename1 |
| ZYF425 | 153038 | 1802 | -7 | 2900 | filename1 |
| ZYF426 | 90696 | 1801 | -95 | 4900 | filename1 |
| ZYF426 | 140960 | 1801 | -81 | 4900 | filename1 |
| ZYF426 | 149500 | 1801 | -77 | 3600 | filename1 |
| ZYF426 | 156428 | 1801 | -42 | 2900 | filename1 |
Solved! Go to Solution.
Labels:
- Labels:
- Common Use Cases
4 REPLIES 4
ACE Emeritus
‎04-17-2018
07:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You'll want to use the Summarize tool! Use Group By for all the fields except the hours, and then choose Sum for your Hours field.
Cheers,
NJ
LordNeilLord
15 - Aurora
‎04-17-2018
07:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @kimdelgadillo
The summarize tool is perfect for this job!
Just sum Hours and group by everything else :)
‎04-17-2018
09:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot! it works
‎04-17-2018
09:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot! it works
