O'Reilly logo

MDX with Microsoft SQL Server 2008 R2 Analysis Services: Cookbook by 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

Identifying the number of columns and rows a query will return

Knowing the number of columns or rows the query will return can be handy. That way you can calculate the average value of a measure and compare individual values with it. You can also analyze the results of ABC analysis and see if the number of members in groups A, B, and C matches the expected percentage. In other words, what percentage of members contributes to 80% of the results, the expected 20%, or another percentage? These are just some of the situations where knowing the number of rows or columns is essential. How difficult is to get it when we need it?

If we're the one writing the MDX query, nothing stops us from defining a set with whatever was supposed to go on rows, count ...

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