How do you calculate a "Trending" formula

I would like to compute a simple “Trending” formula, like:
(# upvotes)/((# days since creation date)^(1/2))

How would you do this?
I have 2 issues:

  • getting # days since creation date
  • how to do the () and ^(1/2)

Thanks for the help!

1 Like

Hey @john11,

To get the number of days between two dates in Bubble, just subtract and then format as days. It will take a format like this (obviously your parameters will be different):

33%20PM

Parenthesis are supported in the Toolbox plugin. Go get that free plugin and do your calculations in the Expression element that comes with that plugin.

I don’t know about trending formula’s, but if that caret represents a power you can use Math.pow(x, y); within the Expression element and Bubble also supports powers when dealing with numbers:

51%20PM



Looking to accelerate your app development?

Let me turn
:thinking: :tired_face: :confounded:

into
:grinning: :sunglasses: :woman_student:

Development through Coaching at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

5 Likes

That worked perfectly! Thanks!

This topic was automatically closed after 70 days. New replies are no longer allowed.