How to calculate multiple variables from multiple bundles, all in once?

Hi,
I’m trying to do some calculations.
Here, my data come from Airtable (search records). Many records are found and contain different pieces of information, such as :

  • type of file
  • for each file : a price
  • for each file : a commission
    I would like to be able to compute info, so that depending on the type of file, I can have the sum of price and the sum of commission; and then it would update Airtable with the computed information.
    Is there a way of doing this other than with routers?

here is where I am at the moment with “LOA” being one of the types of files I have.

Thanks !!

1 Like

@Admin_PL Filers way will be simple and easy to create ang get values using Numeric aggregator. Further, You can try creating an array of all record output with all necessary calculation related values and use sum function with map function.

You’re absolutely on the right path! :rocket: And you’re also right that routers, while useful, can quickly become unwieldy if you have many different file types (like “LOA”, “INV”, “CON”, etc.). Fortunately, there is a cleaner and more scalable way to achieve this in Make — without using multiple routers.

Better Solution Without Routers:

  1. Use the Array Aggregator
    This is the heart of the solution:

After your “Search Records” (Airtable 5) step, insert an Array Aggregator.

Set it up to group by file type (e.g., “type_of_file” field).

Aggregate the price and commission fields for each group.

  1. Then Use an Aggregated Tools Module to Sum Values
    Once you’ve grouped by type_of_file, use a “Set multiple variables” or a “Set variable” module:

Use the sum() function to calculate totals from the array of prices and commissions inside each group.