70-466 · Question #157
You are developing a SQL Server Analysis Services (SSAS) cube. The cube contains a measure group named Sales and a dimension named Products. The Products dimension contains an attribute named Product
The correct answer is A. Use the SCOPE statement.. The MDX SCOPE statement defines a subcube intersection and applies assignments within it, making it the correct tool to restrict a calculation to a specific dimension member like the Clothing category.
Question
Options
- AUse the SCOPE statement.
- BUse the IIF statement.
- CUse the Filter function.
- DUse the CurrentMember function.
- EUse the IsLeaf function.
- FUse the Drillthrough statement.
How the community answered
(61 responses)- A85% (52)
- C8% (5)
- D2% (1)
- E3% (2)
- F2% (1)
Why each option
The MDX SCOPE statement defines a subcube intersection and applies assignments within it, making it the correct tool to restrict a calculation to a specific dimension member like the Clothing category.
The SCOPE statement in an MDX script lets you define a precise subcube - for example, the intersection of [Products].[Product Category].[Clothing] and [Measures].[ProductCategoryDiscount] - and then assign a calculation (THIS = [Measures].[Sales Amount] * 0.1) within that scope. This cleanly isolates the 10 percent discount calculation so it applies only to the Clothing category, exactly matching the requirement.
IIF is a conditional expression used inline within a single MDX expression; it requires explicitly testing a condition on every evaluation and is less clean for applying a calculation across an entire category slice than a SCOPE assignment.
Filter returns a subset of a set where a condition is true; it is used to narrow down sets for queries, not to define and assign calculated values scoped to a dimension member.
CurrentMember returns the current member being iterated in an MDX expression; it is a helper function used inside expressions and does not by itself define a scoped calculation for a specific category.
IsLeaf tests whether the current member is a leaf-level member in a hierarchy; it is used for conditional logic in parent-child hierarchies and is unrelated to scoping a calculation to a specific category.
The Drillthrough statement is used to retrieve the underlying detail rows from the fact table for a cell value; it is an action type, not a mechanism for defining calculated member logic.
Concept tested: MDX SCOPE statement for scoped calculated assignments
Source: https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/mdx-scripting-fundamentals-analysis-services
Topics
Community Discussion
No community discussion yet for this question.