I have not been able to replicate many of the behaviors you expect from MDX in MSAS, so generally getting CUBE functions to only return specific elements has been challenging.
My solution has been to use CUBERANKEDMEMBER for an entire list of members, and then using a combination of INDEX / MATCH / RANK formulae to get what I'm looking for. So, in your (generalized) example, I would create a CUBESET that sorts the dimension (A,B,C,D,E), list all of those manually, and then create calculations to make them happen.