It's not possible to include such a condition within a classical set analysis. Even if you get the syntax right to have it within a set analysis statement it won't be executed as it else it's an if-loop. Therefore you should remain by you origin approach.