5 Replies Latest reply on Aug 15, 2018 4:24 PM by Deepak Rai

# Preventing calculations with variables with empty fields

I created a calculated field names "symptom change" that grouped the variable "rank difference" into 3 categories (better, worse, no change). The issue I am running into, is that the "symptom change" field is being calculated for patients who have no values in the "rank difference" field. How can I prevent this from happening?.

 Patient  Name Rank 1 Rank 2 Rank Difference Symptom Change bob smith 1 better jill scott 0 0 0 no change mary heart 6 3 -3 better joe rogan 3 5 2 worse
• ###### 1. Re: Preventing calculations with variables with empty fields

Hello Carmon,

Can you Explain a bit? What Is The Criteria for Better Worse Etc? and a Work book Pl.

Thanks

Deepak

• ###### 2. Re: Preventing calculations with variables with empty fields

I have attached a sample workbook.

If a change in score is 2 or more than we consider that a worsening of the symptom

If a score has only changed 1 point or didn’t change at all we consider that a no change in score

If a score went down 1 point or more then we consider that an improvement in score

Here is the calculation I wrote for the calculated field:

If rank difference > 1

Then “worse”

Elseif rank difference = 1

Then “no change”

Elseif rank difference = 0

Then “no change”

Else “better”

End

• ###### 3. Re: Preventing calculations with variables with empty fields

Use This Calc:

• ###### 4. Re: Preventing calculations with variables with empty fields

I am getting an error message, did I put a parenthesis in the wrong place?

If not ISNALL ()

Then IF () > 1

Then “worse”

Else if  = 1

Then “no change”

Else if  = 0

Then “no change”

Else “better”

end

• ###### 5. Re: Preventing calculations with variables with empty fields

If not ISNULL ()

Then (IF () > 1

Then “worse”

Else if  = 1

Then “no change”

Else if  = 0

Then “no change”

Else “better”

end)

END

1 of 1 people found this helpful