William
3 years agoQrew Trainee
Convert yes/no multiple choice to numerical value?
Is there a way to convert text into numerical values? What I am trying to do is have several fields where the choices can either be yes, no or NA. I want each of these to assign a numerical value.
for example:
field one: yes = 30, n = 0, na = 30
field two: yes = 30, n = 0, na = 30
field three: yes = 40, n = 0, na = 40
Then I want a field at the end which gives the percentage ... so if field 1 was yes, field 2 was no and field 3 was yes the score would be 70%. Attached a mockup screenshot of what I mean. Thanks.
------------------------------
William
------------------------------
for example:
field one: yes = 30, n = 0, na = 30
field two: yes = 30, n = 0, na = 30
field three: yes = 40, n = 0, na = 40
Then I want a field at the end which gives the percentage ... so if field 1 was yes, field 2 was no and field 3 was yes the score would be 70%. Attached a mockup screenshot of what I mean. Thanks.
------------------------------
William
------------------------------
- No problem, you can make a formula numeric field set to display as a percentage and do the calculations all in one field.
var number FieldOneScore = Case([Field One],
"yes",30,
"n",0,
"na",30);
var number FieldTwoScore = Case([Field Two],
"yes",30,
"n",0,
"na",30);
var number FieldThreeScore = Case([Field Three],
"yes",40,
"n",0,
"na",40)
($FieldOneScore + $FieldTwoScore + $FieldThreeScore) / 100
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------