Dissecting and debugging MDX queries
When writing a query involving complex calculations, you might have a hard time trying to debug it, if there is a problem inside the calculation. But there is a way. By breaking complex sets and calculations into smaller pieces and/or by converting those sets and members into strings, we can visually represent the intermediate results and thereby isolate the problematic part of the query.
True, there is no real debugger in the sense that you can pause the calculation process of the query and evaluate the variables. What you can do is to simulate that by concatenating intermediate results into strings for visual verification.
For this recipe, we will use the final query in the previous recipe, Iterating ...