If you mean eliminating rows with pallet = P:
If you mean eliminating any style for which any row of that style has pallet = P, I think this?
Not that these are your expressions. Your expressions seem much more complicated in some cases, but it's the set expression that's important. In some cases there's no aggregation function at all. If you need the logic, use an only() expression around those expressions to add the set analysis.