To perform this calculation, we will use a series of isblankormissingcode statements nested together and return 55555 if any field is empty or contains a missing code.


This essentially says if any of the listed fields are blank or contain missing data codes, return 55555, otherwise add the fields together.


Note the number of closing parentheses match the number of “if” statements with opening parentheses.


if(isblankormissingcode([abc2_1]), 55555,

if(isblankormissingcode([abc4_1]), 55555, 

if(isblankormissingcode([abc8_1]), 55555, 

if(isblankormissingcode([abc10_1]), 55555, 

if(isblankormissingcode([abc14_1]), 55555, 

if(isblankormissingcode([abc19_1]), 55555, 

if(isblankormissingcode([abc25_1]), 55555, 

if(isblankormissingcode([abc29_1]), 55555, 

if(isblankormissingcode([abc34_1]), 55555, 

if(isblankormissingcode([abc36_1]), 55555,

if(isblankormissingcode([abc41_1]), 55555,

if(isblankormissingcode([abc47_1]), 55555, 

if(isblankormissingcode([abc50_1]), 55555, 

if(isblankormissingcode([abc52_1]), 55555, 

if(isblankormissingcode([abc57_1]), 55555, 

[abc2_1]+[abc4_1]+[abc8_1]+[abc10_1]+[abc14_1]+[abc19_1]+[abc25_1]+[abc29_1]+[abc34_1]+[abc36_1]+[abc41_1]+[abc47_1]+[abc50_1]+[abc52_1]+[abc57_1])))))))))))))))



Note: This article assumes missing data codes have been configured and "55555" is once of those existing codes.


More information on using Calculations and Conditional Logic can be found on the Help & FAQ page in REDCap


For additional assistance, please contact the REDCap Support Team

  • No labels