I am having trouble with a calculation. I have 10 optional fields named dt_sv_1_kpa up to dt_sv_10_kpa. I wish for a P to be returned if it meets the following conditions, otherwise an F will return:
#sv1 has to be greater than or equal sinmin, if it isn't then the calc should return F
${dt_sv_1_kpa} >= ${kpa_sinmin_dt}
and
#assuming the above condition is met:
#if sv2 is greater than sinmin return P, or if sv2 is left unanswered also return P, the only time this should return F is if sv2 is answered and the value is less than sinmin.
${dt_sv_2_kpa} >= ${kpa_sinmin_dt} or ${dt_sv_2_kpa} = ''
this should then continue all the way through, checking if sv3...sv10 are either unanswered or greater than sinmin. If they are answered but are less than sinmin then an F should be returned.
This would all be one calculation checking through all of the sv's.
I have tried multiple approaches but either get error messages or the result being an F unless all values are entered and above sinmin.
For example I currently have this (shortened to first two):
if(${dt_sv_1_kpa} >= ${kpa_sinmin_dt} and (${dt_sv_2_kpa} >= ${kpa_sinmin_dt} or ${dt_sv_2_kpa} = ''), 'P', 'F' )
but it doesn't return a P unless i put a value into sv2 that is greater than sinmin. The same is true if i change '' to 0.