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

MDX script

This part covers things you encounter when writing calculations in the MDX script: scopes, assignments, and similar.

Calculate statement

The Calculate statement, usually the first statement of the MDX script, aggregates the values of leaf members to their ascendants. Whenever you need to do something before that aggregation process, put those corrections before the Calculate statement. Otherwise, put the calculations after it. The latter is something you'll do in majority of cases; the former will rarely be required.

Scopes

The scope is a part of MDX script in which we modify the value for a specified subcube. It can be imagined as something similar to computed columns or triggers in the relational database, not in the sense of performance ...

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