Screen out participants BMI (2) | XM Community
Skip to main content
Solved

Screen out participants BMI (2)

  • October 29, 2018
  • 6 replies
  • 416 views

Hi, last week I asked your help to screen out participants based on their BMI (kilograms/centimeters). I now want to add screening based on BMI in terms of Feet-Inches and pounds. Somehow my formula doesn't work. Can anyone help my find the error I made? I have three text entry items (content validation : number) The formula and survey flow are attached. Thank you!

Best answer by TomG

I think it should be: ``` $e{ ( ( q://QID3/ChoiceTextEntryValue ) / ( ( ( ( q://QID1/ChoiceGroup/SelectedChoices ) * 12 ) + ( q://QID2/ChoiceGroup/SelectedChoices ) ) ^ 2 ) * 703) } ``` I added three spaces: 1. between q://QID3/ChoiceTextEntryValue ) and / 2. between ( and q://QID2/ChoiceGroup/SelectedChoices 3. between ) and ^
View original

6 replies

  • Author
  • 17 replies
  • October 29, 2018
I can see that it is an invalid expression.

  • Author
  • 17 replies
  • October 29, 2018
I tried it with a new formula, which seems to be valid. However, it still doesn't show the calculation of BMIP and it appears that even though I fill in the questions they are registered as if there were not displayed.

  • Author
  • 17 replies
  • October 29, 2018
Ok, i have been working on it all day and I now know where my problem is: My problem is with the BMI based on feet-inches and pounds (BMIP). First: BMIK (centimeters and kilograms) is going fine: formula BMIK: (x/ (( y/100)*(y/100))) and formula embedded data BMIK: $e{ ( q://QID5/ChoiceTextEntryValue ) / ( ( ( q://QID4/ChoiceTextEntryValue ) / 100 ) * ( ( q://QID4/ChoiceTextEntryValue ) / 100 ) ) } Also, the formula for BMIP is fine: I can see that it calculates the right numbers for BMIP: based on the formula BMIP: ((x/(((y*12)+z)^2))*703) But then the problem is with the formula for embedded data....the embedded data of BMIP all show 0 zero, so this does not match the formula somehow. $e{ ( ( q://QID3/ChoiceTextEntryValue )/ ( ( ( ( q://QID1/ChoiceGroup/SelectedChoices ) * 12 ) + (q://QID2/ChoiceGroup/SelectedChoices ) )^ 2 ) * 703) } Can anyone see the error maybe?

Akdashboard
Level 4 ●●●●
Forum|alt.badge.img+6
  • Level 4 ●●●●
  • 488 replies
  • October 29, 2018
@Loes Doing a quick look at your BMIP formula, and it looks like you are missing spaces before and after 12 for QID50 and after the QID51 multiplication sign. It should read (with some short hand) q://QUID52 / ( ( ( QID50 * 12 ) + QID51 ) * ( ( ( QID50 * 12 ) + QID51 ) ) ) * 703 ) Note - I tried to bold or underline the spaces, but it formatted poorly.

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5934 replies
  • Answer
  • October 29, 2018
I think it should be: ``` $e{ ( ( q://QID3/ChoiceTextEntryValue ) / ( ( ( ( q://QID1/ChoiceGroup/SelectedChoices ) * 12 ) + ( q://QID2/ChoiceGroup/SelectedChoices ) ) ^ 2 ) * 703) } ``` I added three spaces: 1. between q://QID3/ChoiceTextEntryValue ) and / 2. between ( and q://QID2/ChoiceGroup/SelectedChoices 3. between ) and ^

  • Author
  • 17 replies
  • October 29, 2018
Thank you! It worked like this: (x/(((y*12)+z)^2))*703 $e{ ( q://QID3/ChoiceTextEntryValue ) / ( ( ( ( q://QID1/ChoiceTextEntryValue ) * 12 ) + ( q://QID2/ChoiceTextEntryValue ) ) ^ 2 ) * 703 }

Leave a Reply