2 Replies Latest reply on Apr 3, 2010 8:54 PM by Ray

# Calculation problem~

### Title

Calculation problem~

### Post

Dear All

I have write the following code in field "recline function" to calculation

Case (Balance Ability = "Good"; "No"; Balance Ability = "Poor"; "Yes";Respiratory Function = "Good"; "No"; Respiratory Function="Poor"; "Yes" )

but the problem is that it work good will I select the field "Balance ability", but it doesn't work while I select  the field "Respiratpry Function" for good or poor.

Could someone know why ?

Besides, is it possible to add the "or" function in this place. For example, if someone select either "Balance ability" or "Respiratory Function" for Poor,

the "recline function" field will show up "Yes".

thanks

Ray

• ###### 1. Re: Calculation problem~

Case (Balance Ability = "Good"; "No"; Balance Ability = "Poor"; "Yes";Respiratory Function = "Good"; "No"; Respiratory Function="Poor"; "Yes" )

Try:

Case (

Balance Ability = "Good" or Respiratory Function = "Good" ; "No" ; "Yes"

)

... but just to verify ... are there any records which might not meet either good or poor here?  I ask because, if both fields are empty, you will have an empty result in this calculation.  But if either of the fields contains data, it will evaluate.

Case() or If() calculations will evaluate and stop when they hit the first true so, in this case, if either field contains "Good" then the answer will be "No."  Otherwise the answer will be "Yes".  On the other hand, if you want BOTH Balance Ability and Respiratory Function to be good before producting a 'No' answer then you must change the OR to AND so that both criteria are true before 'no' is returned.  And everything else (except both fields empty) will return "Yes".

• ###### 2. Re: Calculation problem~

This information is really helpful.

The calculation can work as what I want

thanks a lot

Ray