• Yes, you cannot use the same hierarchy in the where-clause and the "Rows" axis.

    You have 2 options in this case:

    1. Instead of using it in the where-clause, create a filtered set. Similar to the calculated member, you'll use "with set... as..." and then use that set on the axis.

    2. If this member is part of a hierarchy, use the dimension attribute directly to filter. If there is no hierarchy, you could create one if it makes sense.

    A few other observations if I may:

    * Using the StrToSet() function in calculated members/sets usually slows the query quite a bit. Avoid that if you can, by building up the query dynamically with an expression. Not pretty, but could be significantly better than the poor performance.

    * Your query is a good example of the bad MDX that the designer or query builder generates. You should be able to move the sub-queries either to the where-clause or create similar calculated sets. It'll make the query easier to read as well.