nerdexam
Microsoft

70-466 · Question #55

You are developing a SQL Server Analysis Services (SSAS) cube for the sales department at your company. The sales department requires the following set of metrics: - Unique count of customers - Unique

The correct answer is B. Place the distinct count measures in separate measure groups. F. Use the Distinct Count and Sum measure aggregation functions.. Distinct Count measures must be isolated in their own measure groups to preserve query performance, and the Distinct Count aggregation function is required to accurately count unique dimension members.

Build an analysis services database

Question

You are developing a SQL Server Analysis Services (SSAS) cube for the sales department at your company. The sales department requires the following set of metrics: - Unique count of customers - Unique count of products sold - Sum of sales You need to ensure that the cube meets the requirements while optimizing query response time. What should you do? (Each answer presents a complete solution. Choose all that apply.)

Options

  • APlace the measures in a single measure group.
  • BPlace the distinct count measures in separate measure groups.
  • CUse the additive measure group functions.
  • DUse the semiadditive measure group functions.
  • EUse the Count and Sum measure aggregation functions.
  • FUse the Distinct Count and Sum measure aggregation functions.

How the community answered

(19 responses)
  • A
    5% (1)
  • B
    68% (13)
  • C
    5% (1)
  • E
    21% (4)

Why each option

Distinct Count measures must be isolated in their own measure groups to preserve query performance, and the Distinct Count aggregation function is required to accurately count unique dimension members.

APlace the measures in a single measure group.

Placing distinct count measures in the same measure group as additive measures causes severe query performance degradation because the engine cannot apply separate optimized aggregation designs for the two incompatible aggregation strategies.

BPlace the distinct count measures in separate measure groups.Correct

Placing distinct count measures in separate measure groups is a required SSAS best practice because distinct count measures use a fundamentally different internal storage, partitioning, and aggregation strategy - mixing them with additive measures in the same measure group forces the engine to apply the less efficient distinct-count query plan to all measures in that group, severely degrading response time.

CUse the additive measure group functions.

Additive aggregation functions such as Sum and Count include duplicates and therefore cannot produce a unique (distinct) count of customers or products.

DUse the semiadditive measure group functions.

Semi-additive functions such as AverageOfChildren and LastChild are designed for time-based aggregations of balance-type measures and cannot perform distinct counting of dimension members.

EUse the Count and Sum measure aggregation functions.

The Count aggregation function counts all rows including duplicates, so it would overcount customers and products and fail the uniqueness requirement.

FUse the Distinct Count and Sum measure aggregation functions.Correct

Using the Distinct Count aggregation function for the unique customer and unique product measures ensures accurate deduplication at every aggregation level, while using Sum for the sales measure provides correct additive rollup - this combination satisfies all three stated metric requirements with the correct semantics.

Concept tested: SSAS distinct count measure group isolation and aggregation function selection

Source: https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/use-aggregate-functions

Topics

#distinct count#measure groups#query optimization#aggregation functions

Community Discussion

No community discussion yet for this question.

Full 70-466 Practice