How to calculate x*(1-y)

I need to show a value based on the calculation above. How do I do this in the content editor?

1 Like

Hey, @PineappleJoe,

I suppose x and y are dynamic data right?
If yes, you can do some number operations :grinning: :computer:

Another option would be to use 2 custom states. You could have something like this, although there’s probably alternative ways also.

State_1 = 1 -y
State_2 = x * State_1

State_2 should be your answer.

You may also be able to try it like this in one line…


Ok. Thanks. @pork1977gm So if Y is an edit field then state = 1-y would update each time the edit field y was updated right?

Thanks @hacker. will look at the link and video.

Ok. I just took a look. I dont see how you get the parenthesis type functionality with formatted as.

Current Cells Fee Value * (1 - Input Cost Vale).

Im not sure how formatted as would enable the above to work. Could you show me?

It would yes but if you’re running the calc in a workflow then you’d have to run the workflow each time y changed. It kind of depends on how you’re displaying it really. Lots of ways to do things in bubble !

You can first do the parenthesis and then the multiplication or, you can set a state of the result of the parenthesis and then do state * x

1 Like

Yeah I tried that before but I cant even do 1 - x

Ok. Found out that I can use states to represent the value one because a fixed value of 1 wont work.

Seems like a feature request

Your state is a number state right?

Yeah it is. I was just not able to type 1 - x. I had to make a state then I could get to STATE - x.

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