Sumproduct: How to go from list of things to list of numbers

Hi,

So glad I discovered Bubble - what an amazing tool, platform and community!

Maybe a basic question, but I’m having trouble getting the sumproduct to work in my favor.

This is the type in the database I’m working with:

Training(s)

  • List of Users
  • Price (number)

Basically I’m trying to get the sum of the products List of Training’s Price (this is OK) and List of Training’s Users:count, but as you may understand, the latter returns just a number (total count of all Users in all Trainings. I need to return a List of numbers, that corresponds to the List of Trainings but with values (numbers) that are the sum of the Users per Training.

Been searching the forums for a while and trying to adapts some answers including :filtered Advance: in my favor, but I’m not able to work it out.

Help please :slight_smile:

Thanks,
Albin

I am also looking for a solution. I was unable to use the math.js api

Hi,
You can actually use “calculate Formula”. In the element inspector, you can do the followings:
Insert Dynamic Data
Calculate Formula
Calculate Sumproduct

1 Like