How do i sum up a field in my database?

I have a field called balance in my users data type, it stores numbers,
my question is how do i add the balance (number) of each user together and show the total in a text element

1 Like

Hi there, @timeforce01… something like Search for Users balance:sum should do the trick. That being said, you will want to make sure that any privacy rules you have on the User data type do not get in the way of being able to search for all users and see their balance field.

Hope this helps.

Best…
Mike

it didnt work, it just shows 0

Just saying it didn’t work isn’t super helpful.

Did you check your privacy rules? Post some screenshots if you want help because, otherwise, it’s pretty difficult (if not impossible) to know what’s going on.

thanks, it worked when i changed the privacy to public

1 Like

Mike you are a life saver! Been looking for this solution and boom! You are a pro!

1 Like

Happy to help, @TomIsCool! Just remember, the first rule of Bubble is you do not talk about Bubb… oh, wait, that’s the first rule of something else. The first rule of Bubble is it’s almost always privacy rules.

1 Like