I think your issue is that this is "working as designed". The restricted measures window in the analytic view uses OR to combine lines. Therefore any record that is <> Z3 OR <> Z5 is included. Obviously no record can be both Z3 AND Z5, so nothing gets excluded from the result.
To get this to work you will need 2 restricted measures and a calculated measure. Calculated measure will be = ABGRU - RM_EXCLUDE_Z3 - RM_EXCLUDE_Z5.
Alternatively, you can use SQL in the Calculation View as suggested by others.