Calculating the Total Value by Multiplying and Summing Database Fields

Hello,

I am currently working on an portfolio application, but there is something I cant get to work.
Lets say there are two datatypes: User and Share. Each User has a field named OwnedShares, which is a List of the datatype Share. Each Share has the fields PricePerShare and TotalShares which are both numbers.

The goal is to show the value of the portfolio in a text-item.

I thought the dynamic data would look something like this:

Current User’s OwnedShares:each item’s PricePerShare MULTIPLY BY each item’s TotalShares:sum

But somehow I cant find somethind like multiply by or *. What did I do wrong here?

Thanks for help

you need to sum the pricepershare before multiplying it

you can’t multiply a list of numbers