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.
Question
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)- A3% (1)
- C3% (1)
- D95% (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.
The Dimension Attribute expression is used to reference a dimension attribute in MDX but does not provide ranking or top-N filtering functionality.
Hierarchize reorders members of a set into a natural hierarchy order but does not filter or rank members by a measure value.
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.
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.
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
Community Discussion
No community discussion yet for this question.