Skip to main content

Element-wise multiplication of two arrays of numbers

  • May 7, 2021
  • 1 reply
  • 1 view

Hey all, I’m wondering if there is a way to perform element-wise multiplication of two arrays of numbers. For example, if I have two fields with arrays [1, 2, 3] and [4, 5, 6] respectively, can I write a formula that produces [4, 10, 18]?

As an example use case, I could calculate a weighted average of an array of numbers [10, 20, 30] with weights [.2, .5, .3]. After element-wise multiplication, I could take the sum with SUM([2, 10, 9]) = 21 (In this example, I’m just taking the dot product of these two arrays).

1 reply

  • Known Participant
  • 26 replies
  • July 16, 2023

Did you ever find a solution for this? Looking to do somethign similar to find weighted averages or two rollup fields.


Reply