Hi,

I was trying to test multiplying two arrays together and then summing the result (like SumProduct in Excel).

I tried to use a recursive MapData function for this (see attached screenshot). Is there any way of achieving this?

Thanks,

Andrew

Hi,

I was trying to test multiplying two arrays together and then summing the result (like SumProduct in Excel).

I tried to use a recursive MapData function for this (see attached screenshot). Is there any way of achieving this?

Thanks,

Andrew

Sorry but there's no way to do that. The MapData function is for you to apply an existing function to every member of the array.

Andrew,

Did you find a way round this? I have the same requirement to sum the product of two arrays.

Simon

Hi Simon. The only way I could get this to work was as follows:

For Arrays X{1,2,3,...n} and Y{1,2,3,...n)

1.) Create "Child" elements for each array element 1,2,3...n.

2.) Have an "X" and a "Y" attribute in these elements, and populate them.

3.) Create an attribute "Z" that uses a formula, being "X*Y"

4.) Create a parent Element that has all the array elements as children, and use a roll-up analysis to sum-up the "Z" attributes.

Not an ideal workaround, but can be made to work (provided that the arrays are fixed-length and not dynamic).

Regards,

Andrew

Andrew,

Thanks for the info. I also created an element that did the same kind of thing.

The tricky thing in my case is that I need to then roll-up the rollups. So my SumProduct result needs to be archived so that I can then do a further rollup over a changeable period of time of these results.

It’s definitely functionality that would be good if supported directly in the product.

Simon

Sorry but there's no way to do that. The MapData function is for you to apply an existing function to every member of the array.