O'Reilly logo

Microsoft® SQL Server® 2008 MDX Step by Step by C Ryan Clay Bryan C Smith and Hitachi Consulting

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 Averages

Averages are used to calculate a representative value for a set, allowing a set to be evaluated based on the size of its values and not the size of the set itself. In this way, averages facilitate cross-set comparisons. In Analysis Services, averages are calculated using both the MDX Avg function and custom expressions.

Calculating Averages with the Avg Function

You can use a number of techniques for calculating averages. Of these, the arithmetic average is the most common. With an arithmetic average, the values in a set are summed and then divided by the number of values in the set. In this manner, each value in the set is given equal weighting in terms of its contribution to the average. In MDX, this average is calculated ...

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