Cant get average from Array from Array Aggregator

Hey everyone,

I have the following issue:
Array aggregator outputs an array with 3 values which all have the field “Price” with a number value.

Next I’m trying to get the average number in the array by doing that in set variable step:
average(17. Array)
Unbena333nnt
Unbenann3242t

But the input bundle say the variable bundle is empty…

If i instead insert:
average(17.array.Price)

It just gives me the first value.

What am I’m missing here?

Thank you already - I’m sitting on that issue for over two hours now :grin:

I found it.

I needed to extract the Price fields first to a new array like this:
https://www.make.com/en/help/tutorials/extract-an-item-and-or-its-value-from-an-array-of-collections

2 Likes

Hello,

from what I can tell, the average() function only works on arrays that contain only numeric values, where your array contains collections (key-value pairs). You can maybe try an iterator on the array and then a numeric aggregator module to find the average.

2 Likes