calculations are performed on a line item basis,
so if you have 3 items in the cart, the calculation will be preformed 3 times.
on the first line, if the Category is 52, the calculation will return 0, if not it will return 1
Same for the second line and the third line.
in your shipping rules the added trigger:
AND
"Subtotal for any cart column"
if the subtotal for column "applyShipping" is ">" a value of "0"
will apply shipping if there is an item that is not in the 52 category in the cart.