How to calculate math formula and display as dynamic data

Hi, does anyone how I can possibly display this formula as a Dynamic data to display a number?

ObjectA:sum -(ObjectA:count 10).8

Thank you

Can you clarify what operations you want to perform? What happens with the 10 and the 8?

Hi,

They are multiplication. Bubble took out some of the functions when I typed it.

It should read the “sum of A minus (the number of items of A times 10) then multiply by .8”. The “.8” stands for 80%
it should read:
ObjectA:sum-(ObjectA:count x10)x.8

Thanks for responding

If using parentheses, you need an extra pair, multiplication uses an asterisk, and decimal numbers normally need a preceding zero before the dot, and specify a number field in ObjectA to do the sum on:
(ObjectA’s number:sum-(ObjectA:count x10))*0.8

This would work in the Toolbox plugin’s Expression element.

To make it work in Bubble, you need to work with the following aspects:

  • Calculations generally go from left to right, ignoring order of operations, with some exceptions.
  • Parentheses aren’t used.

So this would work:
ObjectA:count * -10 + ObjectA’s number:sum * 0.8

2 Likes

Thank you so much for all of your on helping me figure it out. :relaxed:

1 Like

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