How can I apply a formula to data I'm listing?

Hi Everyone,

Loving Bubble so far! I am listing some stock data from a DB - fields are. name and value. I want a box at the top of the page to dynamically calculate the total value of fields being displayed.

Ideally I do not want to pull this from a DB because I’m giving users different ways to slice/dice the data. As they filter stocks then the total value should be updated to reflect only what they see on their screen.

Any idea how I can get this done?

To help, if I had direct access to sql, I would do something like this:
SELECT SUM( value )
FROM portflio

or something to that effect.

I think I solved this using math.js, pretty cool plug in and helpful.