[Monday.com] Getting the sum of a number value for all all connected items

In short, we have three CRM boards that are connected to a central payment board. A donor in the CRM board can be connected to multiple payments. At the end of each year, we’d like to sum the total of all connected payments for each donor, and then place that total in a numbers column in the CRM boards to preserve the yearly give of each donor. Once we preserve the yearly sum, we will be moving all payments to an ‘archive’ board.

The flow I’m attempting in Make looks like:
List all items (In CRM board) → Iterate thru the ID’s of connected payments per item → Get ‘Amount’ value of each payment → sum ‘Amount’ → update the ‘2023 Give’ column in the CRM board

The issue:
The order of my Array and Numeric Aggregators are not summing the ‘Amount’ for all connected payments per CRM entry

Here’s the current flow in Make (leaving out extra modules that are not relevant)

Here is how the Array Aggregate is set up - 5. ID is the ‘List Items in CRM’ module, so the value would be the item ID of each Donor

Here is the output of the Numeric Aggregate. The result is just the amount of the connected payment, rather than the sum of all connected payments per CRM entry

I’d like to think I have a somewhat decent grasp on Make workflows, but this is one that has stumped me. let me know if I need to clear anything up/provide insight into the issue

Thanks a ton in advance, any help would really help me get out of a jam

Welcome to the Make community!

The Numeric Aggregator aggregates from multiple bundles, but you are passing a single array into it (from the Array Aggregator).

What you need to do is to remove the Array Aggregator and just map the number field into the Numeric Aggregator.

Alternatively, you need to insert an Iterator module to iterate the grouped results from the Array Aggregator, and set the source module of the Numeric Aggregator to the Iterator.

Or (unlikely), you might want to sum all the values within each column item,

2 Likes

Thanks for the reply, and apologies for the late response

We seem to be getting closer to a solution, I think my problem lies in how I am leveraging the ‘group by’ field in these aggregates. The output of my aggregator (module 25) appears to be 1-1, but I beleive it should be only 2 if I am listing 2 items from the CRM board.

I really appreciate your help with this, I still can’t believe this has stumped me as hard as it has

I ended up taking a different approach to this issue and found a solution.

In short, I am listing the mirrored amounts, splitting them by comma and then aggregating the sum.

Once again I really appreciate the time that you took to guide me along

1 Like

Heya there @marceneaux :wave:

Just thought I might step in and congratulate you on the great work you did while solving your troubles.

Thanks for keeping the community healthy and organized by sharing your progress with us. We truly appreciate it. :pray:

FYI: I marked your suggestion as a solution.

1 Like