nerdexam
Microsoft

70-466 · Question #156

You are developing a SQL Server Analysis Services (SSAS) cube. The cube contains a measure group named Sales. The measure group contains a measure named Sales Amount. You need to create a named set th

The correct answer is D. Use the TopCount expression.. The TopCount MDX function returns the top N members from a set ranked by a measure, and when used in a dynamic named set it is automatically re-evaluated on each query.

Build an analysis services database

Question

You are developing a SQL Server Analysis Services (SSAS) cube. The cube contains a measure group named Sales. The measure group contains a measure named Sales Amount. You need to create a named set that displays the top 10 products by Sales Amount. The named set must be updated automatically if the products in the top 10 change. What should you do?

Options

  • AUse the Dimension Attribute expression.
  • BUse the Hierarchize expression.
  • CUse the Generate expression.
  • DUse the TopCount expression.
  • EUse the MDX script.

How the community answered

(37 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    95% (35)

Why each option

The TopCount MDX function returns the top N members from a set ranked by a measure, and when used in a dynamic named set it is automatically re-evaluated on each query.

AUse the Dimension Attribute expression.

The Dimension Attribute expression is used to reference a dimension attribute in MDX but does not provide ranking or top-N filtering functionality.

BUse the Hierarchize expression.

Hierarchize reorders members of a set into a natural hierarchy order but does not filter or rank members by a measure value.

CUse the Generate expression.

Generate applies a set expression to each member of another set and returns the union of results; it is used for set iteration, not for top-N ranking by measure.

DUse the TopCount expression.Correct

TopCount(Set, Count, Numeric_Expression) returns exactly the top N tuples from a set ordered by a numeric measure, which directly satisfies the requirement to show top 10 products by Sales Amount. When the named set is configured as dynamic (the 'Dynamic' property is enabled in the SSAS named set editor), the expression is re-evaluated on every query, so if the top 10 products change the set automatically reflects the current rankings.

EUse the MDX script.

An MDX script is used to define scoped calculations or assignments at the cube level, but the question specifically asks about a named set expression, not a script-level calculation.

Concept tested: Dynamic named sets using TopCount in SSAS MDX

Source: https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/create-named-sets

Topics

#MDX#named set#TopCount#dynamic sets

Community Discussion

No community discussion yet for this question.

Full 70-466 Practice