# Problem in Repeat

Dear Team
I want Question no. "Note_consent2" appear if in any repeat "QAB2_A" or "QAB2_B" is yes
Logic Test_mail.xls (85 KB)

My recommendation would be to add an additional calculation question into your repeat group which determines if either \${QAB2_A} or \${QAB2_B} is yes, and return 1 if so or 0 if not. Then, after your repeat group, you can use the sum() function to count all these results up; if the sum > 0 then in at least one of the repeat groups they answered yes to either of these questions, otherwise if sum = 0 then none of these were ever answered yes in any repeat iteration.

You can use a simple relevant expression on \${Note_consent2} to show/hide it depending on the sum.

can you plz explain it in xls??

inside repeat:

`\${isyes}: calculation = number(\${QAB2_A}='yes' or \${QAB2_B}='yes')`

after repeat:

`\${sum}: calculation = sum(\${isyes})`

`\${Note_consent2}: relevant = \${sum} > 0`

[or something to the effect...]

It's working thank you very much