# Value list-related calculation problem

Question asked by deepakgupta_1 on Jun 7, 2011
Latest reply on Jun 7, 2011 by deepakgupta_1

### Title

Value list-related calculation problem

### Post

Dear all,

I have a drop-down field that has visual acuity values, listed as 6/6+, 6/6, 6/6- etc.

In need to round the selected visual acuity so that 6/6+ OR 6/6 OR 6/6- all are equivalent to 6/6.

I set up a calculation field to do this using a case function as follows...

Case  (PreOp VA="HM" ; "HM" ;  PreOp VA="CF" ; "CF" ; PreOp VA="6/60+";  "6/60"; PreOp VA="6/60" ; "6/60"; PreOp VA="6/60-" ; "6/60"; PreOp VA="6/36+"; "6/36";  PreOp VA="6/36"; "6/36";   PreOp VA="6/36-" ; "6/36"; PreOp VA="6/24+"; "6/24"; PreOp VA="6/24"; "6/24" ; PreOp VA="6/24-" ; "6/24";  PreOp VA= "6/18+"; "6/18";  PreOp VA= "6/18"; "6/18"; PreOp VA="6/18-" ; "6/18" ;   PreOp VA= "6/12+";"6/12";  PreOp VA="6/12";"6/12";  PreOp VA="6/12-";"6/12"; PreOp VA= "6/9+";"6/9";  PreOp VA="6/9"; "6/9";  PreOp VA="6/9-" ; "6/9"; PreOp VA= "6/6+";"6/6"; PreOp VA= "6/6"; "6/6"; PreOp VA= "6/6-";"6/6"; "" )

(I initially used an OR function to shorten the calculation but this did not work, so in the above I have tediously listed out all the individual values and their equivalent.)

The result is that only if HM or CF  selected as PreOp VA,  I get HM and CF.  All other values selected from the drop down list result in 6/60.

What am I doing wrong?