How to calculate across two bundles


Hi
I’m looking at two bundles and would like to take a field value from each and do some calculation then return the calculated value to a new variable. I’m just not sure which modules/functions to employ :slight_smile:

Use the map and sum function It should look something like this when you are done:

image

so
replace the data:lines for your array so just data: Array and the Amount with income in your case.

3 Likes

If you need further assistance, please provide the following:

1. Relevant Screenshots

Please share screenshots of your scenario, any error messages, relevant module fields, and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:

2. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

3. Output Bundles of Modules

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

1 Like

Hi @crm_automator

You can also use numeric aggregator module to add all those values.
Sample Structure created:

image

Outptu:
image

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation

2 Likes

Thank you all and thanks @Msquare_Automation

1 Like

Rather than SUM, Is it possible to add maths function? for example

Sum(This yrs INCOME - Last yrs INCOME)/Last yrs INCOME

This is to show the growth of this yrs income over last yrs

What module is used to add this formula? Text aggregator, a variable or iterator?

You can add formulas directly into the fields your working with using inline fuctions.