How to calculate a groups of peoples goal?

I am struggling with comprehending how I could do this:

Let’s say my goal is to get $10/month from a group of users. This is a shared goal. They can pay however much they want. Some will pay “per year” and some “per month”. Even some “one time” payments, but i won’t worry about that at the moment, makes things more complicated.

I am trying to calculate if they are reaching their goal and show a progress bar for the group.

I keep trying to calculate things and use filters but what i want never shows up in the selections. I am using the Stripe plugin from bubble and the progress bar plugin from bubble too.

Any ideas?

I was thinking of 2 inputs i can hide that calculates each of these separately and then just another function to add them together as a sum. (The yearly i will just divide by 12)

When i try to calculate the “Group’s” stripe information i kind of get stuck. Do i not have access to this data? I dunno, just throwing this out there if anyone has done something similar.

There are two basic approaches:

A. Maintain the calculation as each component is added/updated/removed. A big downside is this can get out of whack if near-simultaneous changes update the same totals.

B. Store the components, and do the calculations on the display side. Looks like you are trying this.

You might find it handy to store the results of your list functions like sum, as intermediate values in custom states, to be used in the next level calculation.

If you need more complexity, you can use javascript to process lists, apply sorting/summing/math expressions, etc. with Toolbox’s Expression, List Item Expression, and JavascriptToBubble elements.

How are your Groups structured?