Microsoft
70-466 · Question #157
70-466 Question #157: Real Exam Question with Answer & Explanation
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.
Build an analysis services database
Question
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 Category. The Sales measure group contains a measure named Sales Amount. You need to create a calculated member named ProductCategoryDiscount. The calculated member must calculate 10 percent of the Sales Amount measure for the Clothing product category. What should you do?
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.
Explanation
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.
Common mistakes.
- B. 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.
- C. 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.
- D. 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.
- E. 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.
- F. 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
Topics
#MDX#calculated member#SCOPE statement#conditional business logic
Community Discussion
No community discussion yet for this question.