You are viewing limited content. For full access, please sign in.

Question

Question

Divide calculation not populating

asked on June 17, 2020

Hello,

 

I am trying to replicate the CDC BMI calculator. The formula is [Weight divided by height in inches (squared)] times 703

I created a height and weight fields and have three hidden fields: height squared, weight divided by height in inches squared and a field with a default value of 703. all of my multiply calculations work and so does my divide calculation when I manually key in the values. When forms populates the values based on the calculation the divide does not happen. My suspicion is because the value zero is here. Does anyone know how to get past this?

 

See below when I manually key the value in the weight divided by height inches value:

 

0 0

Answer

SELECTED ANSWER
replied on June 17, 2020 Show version history

In your BMI field, under Advanced, in the Calculation use

=BMI_Calc_Number*(Weight/(Height*Height))

Then the only hidden field you need is the calculation number

 

Note: I think the issue you are having with your design is that the Weight divided by height squared field is set to 0 decimal places.  You probably need at least 5 if not more.

From the values of your sample, the Weight divided by height squared field should equal 0.0806611570... but a number field with no decimal places will have a value of 0.  Anything times 0 equals 0.

Also, you will want at least 1 decimal in the BMI field.

2 0
replied on June 18, 2020

Thank You Bert! I will try this and post my formulas per Jason's request if I still have an issue.

0 0

Replies

replied on June 17, 2020

It would help to see the calculations/formulas you have set for those fields.

3 0
You are not allowed to follow up in this post.

Sign in to reply to this post.