SUM up a column IF Current User = Owner

const filter = wixData.filter().eq("_owner", userId)

and that should do the trick.

Also don’t forget to add a catch to your then to collect error