If you mean eliminating any style for which any row of that style has pallet = P, I think this?
sum({<style*=P({1<pallet-={'P'}>})>} Amount)
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.