The assement mode is an ancient and very simple way of creating scores. It also doesn't store the values in the database.
Today I wouldn't use the assessment mode anymore and rather create your own assessment via relevance equations.
To keep the number of equations down, you can still use the assessment values for those subquestions of the matrix where the assessment values are "correct" (not negativ).
Code:
{sum(SWK11.value,SWK12.value,(6-SWK013value))}
However, that you get a "undefined variable” with this code, doesn't surprise me much, because I am sure that there is no "SWK013value" variable defined. You are missing a dot between the subquestion code and "value".
The next thing: You are talking about subquestions here. So you need to tell Limesurvey to which question these subquestions belong. So you would need to use something like questioncode_subquestioncode.value.
And in addition to that, I am not sure if you can substract something within sum().
so I would calculate the value for Questioncode_SWK013 in an equation first and then pipe it into the sum.