Calculating the sum of 2 values from 2 different bundles that are 2 levels of collections how?

I want the sum of two values (see screenshot 1), I tried to use array aggregator but I think due to the datastructure I cant map the values in following scenario to perform a simple math function on them.

Sorry im a bit noobish when it comes to this type of stuff. I have watched tutorials and even passed the intermediate exam but I cant figure out this one.

Include screenshots of

Hello, welcome to Make Community.

You can achieve what you need to map() and sum() functions.

Keep in might, map() function requires you to provide raw path where to find values you need: check the video how to do it.

After you build a new array with simple numbers, you can use sum() function from Math section to get a sum of all items in array.

2 Likes

Hey @LeftyLuke

Use numeric aggregator here

3 Likes

this works thank you! I had to remove the array aggregator and map it directly in the numeric aggregator.

I tried this but it doesnt achieve what I want, it returns 0

{{sum(map(3.totalShareStatistics.impressionCount; "impressionCount"))}}

I think it has to do with that array aggregator it now only maps just one bundle

If you aggregated the array already you don’t need map. Just use the sum on impressionscount.

Map is used to generate an array from a complex data structure but you already have a simple array.

2 Likes