Of course, with your coding you can't distinguish between rows and columns.
I think you were a bit confused how this "self.sq_..." works.
As you saw above every QCode that contains a "1" is summed up; like your first sum
sum(self.sq_1):
sum(array_SQ001_SQ001, array_SQ001_SQ002, array_SQ001_SQ003, array_SQ002_SQ001, array_SQ003_SQ001, array_SQ004_SQ001, array_SQ005_SQ001)
These variables "self" and "that" are very mighty; but you have to think about a suitable coding.
Solution:
Code your y-axis "Y01", "Y02", "Y03",...
your x-axis "X01", "X02", "X03",...
Now the validation is
sum(self.sq_X01.NAOK)<=100 AND sum(self.sq_X02.NAOK)<=100 AND sum(self.sq_X03.NAOK)<=100
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless