nerdexam
Microsoft

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.

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.

How the community answered

(61 responses)
  • A
    85% (52)
  • C
    8% (5)
  • D
    2% (1)
  • E
    3% (2)
  • F
    2% (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.

AUse the SCOPE statement.Correct

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.

BUse the IIF statement.

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.

CUse the Filter function.

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.

DUse the CurrentMember function.

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.

EUse the IsLeaf function.

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.

FUse the Drillthrough statement.

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

#MDX#calculated member#SCOPE statement#conditional business logic

Community Discussion

No community discussion yet for this question.

Full 70-466 Practice