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

Calculating various percentages

The next couple of recipes show how to calculate relative percentages, averages, and ranks. We're starting with percentages.

Having a ratio of current member's value over its parent's value is an often-required calculation. It's a form of normalizing the hard-to-grasp values in the table. When the individual amounts become percentages, it immediately becomes clear where the good values are.

There are many kinds of percentages or shares, but we'll take the typical three and present them in this recipe. These are: percentage of parent's value, percentage of level's total, and the percentage of the hierarchy's total.

This recipe will show how to calculate them using the ragged Sales Territory hierarchy of the Sales Territory ...

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