We unfortunately have no Excel access to the cubes as they are cloud based and behind a significant security layer. I have edited the MDX to include the Non Empty...
Not sure around merging dimensions - can you expand on this at all? I guess you mean two dimensions, X containing X1, X2, X3, and Y containing Y1, Y2,...