# Sum the values of specific entries

**URL:** <https://community.make.com/t/sum-the-values-of-specific-entries/3388>\
**Category:** Questions\
**Created:** [August 7, 2022, 5:17pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388 "2022-08-07T17:17:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dusticelli](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/dusticelli/32/2249_2.png) [@Dusticelli](https://community.make.com/u/Dusticelli)\
**Post date:** [August 7, 2022, 5:17pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/1 "2022-08-07T17:17:14Z")

</div>

Hi there,

when I fetch the warehouse stock quantities from my erp system, I get some multiple bundles for same article number. The reason is, that my erp system is tracking them on a individual batch-id size, as they are cosmetics.

that means, I can get for the same product e.g. 3 bundles with different stock quantities which I then should sum to a single bundle with the combined quantity of the 3 bundles.

 ![Bildschirmfoto 2022-08-07 um 19.08.39](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/8/8630673d2c84d8206561747093c311af71249603.jpeg)

I am now trying that for a while, but can’t get any solution.

How could this be done?

thx

---

<div class="post-metadata">

**Author:** ![R-SimplifiedWebhooks](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/r-simplifiedwebhooks/32/3914_2.png) [@R-SimplifiedWebhooks](https://community.make.com/u/R-SimplifiedWebhooks)\
**Post date:** [August 7, 2022, 5:55pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/2 "2022-08-07T17:55:28Z")

</div>

Hi @Dusticelli,

as always, there are multiple ways of doing this 🙂  
You might sum them up in Google Sheets. Search rows for ID, then take the previous value + the value from this operation.  
Outside of GS and in Make you can use the Array Aggregator to aggregate multiple collections into one array. Then take the sum of this array.

It is highly dependent on your workflow which solution I would choose… 🙂  
Hope it helps!

Best,  
Richard

---

<div class="post-metadata">

**Author:** ![Dusticelli](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/dusticelli/32/2249_2.png) [@Dusticelli](https://community.make.com/u/Dusticelli)\
**Post date:** [August 7, 2022, 6:13pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/3 "2022-08-07T18:13:59Z")

</div>

Hello Richard,

thanks for your help. Inside GS I could sum them, but this would cause problems at other places. So I think

> in Make you can use the Array Aggregator to aggregate multiple collections into one array. Then take the sum of this array.

that would be my solution. I tried a while with exact that module, but I think I don’t know how to use that.

When I use the array aggregator I don’t have the “value” option like it is explained in the help section from [make.com](http://make.com) and the 2 options I can choose doesn’t work.

 ![Bildschirmfoto 2022-08-07 um 20.09.48](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/4/4097fa7b64c3b020239b23108881dc30d82b7b3a.jpeg)

I think I would need to tell the aggregator to take only those bundles that have same value within a key, and then, how can I tell the aggregator to use in that case another value from another key to sum together?

Can you help me a bit further with that?

thx

---

<div class="post-metadata">

**Author:** ![Lars\_Bach](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/lars_bach/32/4001_2.png) [@Lars\_Bach](https://community.make.com/u/Lars_Bach)\
**Post date:** [October 12, 2022, 5:51pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/4 "2022-10-12T17:51:12Z")

</div>

Hi @Dusticelli,

Did you ever find a solution to this problem? I’m struggling with the exact same and no Youtube video og documentation article seems to address this specific issue, of how to sum similar line items together for further processing.

Thanks!

---

<div class="post-metadata">

**Author:** ![Dusticelli](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/dusticelli/32/2249_2.png) [@Dusticelli](https://community.make.com/u/Dusticelli)\
**Post date:** [October 12, 2022, 6:40pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/5 "2022-10-12T18:40:52Z")

</div>

Hi Lars,

yes. You can just add a “numeric aggregator” behind the iterator and group by the desired identifier.

 ![Bildschirmfoto 2022-10-12 um 20.36.48](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/2/2dc1f17f883511b546a32dabf63cf0aef13d7cf7.jpeg)

---

<div class="post-metadata">

**Author:** ![Lars\_Bach](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/lars_bach/32/4001_2.png) [@Lars\_Bach](https://community.make.com/u/Lars_Bach)\
**Post date:** [October 14, 2022, 1:25pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/7 "2022-10-14T13:25:44Z")

</div>

Hi @Dusticelli,

Thank you for your reply.

I cannot get my scenario working the way that you have. From looking at the “Explain flow” I think it should be correct, but my quantities aren’t being summed (or counted), and I end up with the same amount of rows as I input.  
 ![scenario](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/6/6dbee03964d4adaf391302b58e6fa57de8af558a.gif)

When I fetch my rows from Airtable, each line has a quantity field and a “Variant SKU”-number which identifies the specific product, like so:

 ![Screenshot 2022-10-14 at 15.20.15](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/0/0ec8ff58bdf38418a4648b5c26362251975e44bb.png)

In the Interator I have input the “Q” field which holds the quantity  
 ![Screenshot 2022-10-14 at 15.21.53](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/3/31f7f68b9d24b9dd11be5cc85fb2bde12d9969bf.png)

The Numeric aggregator I have tried to setup like yours

 ![Screenshot 2022-10-14 at 15.21.58](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/2/2010bcb06827e42c9430de2527fd7fd6b286b199.png)

Since the Iterator seems to require an array, and I’m guessing my quantity field isn’t really an array, maybe that is why this is not working?

Thanks!

---

<div class="post-metadata">

**Author:** ![Dusticelli](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/dusticelli/32/2249_2.png) [@Dusticelli](https://community.make.com/u/Dusticelli)\
**Post date:** [October 15, 2022, 7:59am UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/8 "2022-10-15T07:59:33Z")

</div>

Hi @Lars_Bach ,

this is how I group the data, hope this helps you:

When I fetch data from my API I get a couple of “collectionts” within a nested “result”. These are the items I need to iterate, because each collection represents (in my case) 1 product on a individual batch level. saying that, it means same product may have multiple entries in the collections list, one for each different batch, with the related quantity.

 ![Bildschirmfoto 2022-10-15 um 09.45.46](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/d/dd9059330b24723428e4c715deff0dbd475ebce8.jpeg)

Then in the next step, I iterate these collections to get 1 Bundle as the output for each collection

 ![Bildschirmfoto 2022-10-15 um 09.46.41](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/4/4bc64ee3275119340fa574377a1c2ccf4a081981.jpeg)

 ![Bildschirmfoto 2022-10-15 um 09.47.08](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/8/894819e046992f5d92b6ff4cdbc1197c46941a61.png)

finally to sum those quantities from possible multiple entries of the same product with different batches, I “group” that by articlenumber (in my case)

 ![Bildschirmfoto 2022-10-15 um 09.47.37](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/d/d37ce69e27721a53fa73af784b383864530cb31e.png)

and as a result I get the summed up value for quantity of each articlenumber

 ![Bildschirmfoto 2022-10-15 um 09.48.03](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/7/72eb8549549492e7b9566b7e18f38f9a51ff0d39.jpeg)

---

<div class="post-metadata">

**Author:** ![Dusticelli](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/dusticelli/32/2249_2.png) [@Dusticelli](https://community.make.com/u/Dusticelli)\
**Post date:** [October 15, 2022, 8:04am UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/9 "2022-10-15T08:04:48Z")

</div>

@Lars_Bach

I think you don’t need an iterator, if the ouput from your airtable is already providing bundles for each product (SKU-Variant) you want to group.

Just try to use the numeric aggregator directly after the “watch records” module.

---

<div class="post-metadata">

**Author:** ![Lars\_Bach](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/lars_bach/32/4001_2.png) [@Lars\_Bach](https://community.make.com/u/Lars_Bach)\
**Post date:** [October 17, 2022, 8:08am UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/10 "2022-10-17T08:08:48Z")

</div>

Hi @Dusticelli,

Thanks so much for the detailed walkthrough!

I was finally able to get it working using the following:

 ![Screenshot 2022-10-17 at 10.07.42](https://europe1.discourse-cdn.com/flex013/uploads/make/original/2X/9/97e9db8b86db5f542a6d6f3c59f2a20d951c04ca.png)

Maybe it is overkill, but that’s no concern right now, since we only need to run it once a week.

Thanks again for all your help, highly appreciated! 😃

---

<div class="post-metadata">

**Author:** ![Make\_Bot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.make.com/make_bot/32/14661_2.png) [@Make\_Bot](https://community.make.com/u/Make_Bot)\
**Post date:** [September 7, 2023, 2:51pm UTC](https://community.make.com/t/sum-the-values-of-specific-entries/3388/11 "2023-09-07T14:51:58Z")

</div>


