O'Reilly logo

MDX with Microsoft SQL Server 2016 Analysis Services Cookbook - Third Edition by Sherry Li, Tomislav Piasevoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Getting ready

For this recipe, we will use the final query in the previous recipe, Iterating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required