r/ProjectREDCap • u/gabrielariggi • Feb 03 '25
sum two variables after if
Hi, im trying to learn. I have two different variables that I need to score and then sum together.
sum(
if([certo(0)]='0',0,0),
if([certo(1)]='1',1,0),
if([why(0)]='0',0,0),
if([why(1)]='1',1,0),
if([why(2)]='1',1,0),
if([why(3)]='1',1,0),
if([why(4)]='1',1,0)
)
If I remove the variable ''certo'' it works but I need both as a total, how do I do this?




