Databases Reference
In-Depth Information
Scope Object
Calculated Members
Calculated Cells
Named Sets
Actions
KPIs
Visual Totals
Default Members
FIGURE 29.5
The Scope object contains all the calculations that Analysis Services supports.
.
Subcube scope contains a restriction subcube defined by the SubSelect clause or the
CREATE SUBCUBE
statement.
All these types of scope derive from each other and make up a stack, with global scope on
the bottom and, in the most general case, subcube scope on top. The type of the
Scope
object on the top of the scope stack depends on the MDX statement being executed. If the
current statement is a
SELECT
statement with
subselect
, the subcube scope is on the top.
If it's a regular
SELECT
statement, the query scope is on top of the stack. If the query is a
CREATE
statement, session scope is on top of the stack. Figure 29.6 shows the stack of
scopes. Each scope has a reference to its
parent
—the scope immediately below the current
one in the stack.
When Analysis Services performs lookups for calculations that might reside in any of the
scopes, it starts to iterate from the top of the stack, following parent references. This
makes calculations defined in any scope available during the query execution.
Search WWH ::
Custom Search