In order to fix your original code, you need to add COMPUTE commands, as shown below.

Do if (ResponseAttribution = "Correct" and ResponseMeasure = "Correct" and ResponseReason = "Correct").

COMPUTE FilterVar = 3.

ELSE if ((ResponseAttribution = "Correct" and ResponseMeasure = "Correct") or (ResponseAttribution = "Correct" and ResponseReason = "Correct") or (ResponseMeasure = "Correct" and ResponseReason = "Correct")).

COMPUTE FilterVar = 2.

Else if ResponseAttribution = "Correct" or ResponseMeasure = "Correct" or ResponseReason = "Correct".

COMPUTE FilterVar = 1.

else.

COMPUTE FilterVar = 0.

end if.

EXECUTE.

But notice that your code and my COUNT method yield exactly the same results.

* Generate some data to illustrate.

DATA LIST LIST / ResponseAttribution ResponseMeasure ResponseReason (3A10).

BEGIN DATA

"Incorrect" "Incorrect" "Incorrect"

"Correct" "Incorrect" "Incorrect"

"Incorrect" "Correct" "Incorrect"

"Incorrect" "Incorrect" "Correct"

"Correct" "Correct" "Incorrect"

"Correct" "Incorrect" "Correct"

"Incorrect" "Correct" "Correct"

"Correct" "Correct" "Correct"

END DATA.

Do if (ResponseAttribution = "Correct" and ResponseMeasure = "Correct" and ResponseReason = "Correct").

COMPUTE FilterVar = 3.

ELSE if ((ResponseAttribution = "Correct" and ResponseMeasure = "Correct") or (ResponseAttribution = "Correct" and ResponseReason = "Correct") or (ResponseMeasure = "Correct" and ResponseReason = "Correct")).

COMPUTE FilterVar = 2.

Else if ResponseAttribution = "Correct" or ResponseMeasure = "Correct" or ResponseReason = "Correct".

COMPUTE FilterVar = 1.

else.

COMPUTE FilterVar = 0.

end if.

EXECUTE.

COUNT FilterVar2 = ResponseAttribution ResponseMeasure ResponseReason ("Correct").

FORMATS FilterVar FilterVar2(F1).

LIST.

OUTPUT:

ResponseAttribution ResponseMeasure ResponseReason FilterVar FilterVar2

Incorrect Incorrect Incorrect 0 0

Correct Incorrect Incorrect 1 1

Incorrect Correct Incorrect 1 1

Incorrect Incorrect Correct 1 1

Correct Correct Incorrect 2 2

Correct Incorrect Correct 2 2

Incorrect Correct Correct 2 2

Correct Correct Correct 3 3

Number of cases read: 8 Number of cases listed: 8

So if my COUNT method is not giving the result what you want, neither is your original code.

Aenni wrote

Hi Bruce

Many thanks!

It's not really summing up the correct/ wrong answers. I would like to compare my results with "split file" when **at least** 1 (2, all) question(s) is(are) answered correctly.

So I need to somehow capture all cases in which all (two and one) manipulation check question have been correctly answered to see calculate the results when at least one manipulation check question is answered right and so on.