다음을 통해 공유


CustomRollupExpression (Level Interface)

[!참고]

  이 기능은 다음 버전의 Microsoft SQL Server에서 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 가능한 한 빨리 수정하십시오.

The CustomRollupExpression property of the Level interface contains a Multidimensional Expressions (MDX) expression that is used to override the default rollup mode for the level.

Applies To:clsAggregationLevel, clsCubeLevel, clsDatabaseLevel, clsPartitionLevel

Data Type

String

Access

Access depends on the value of the ClassType property of the object.

Class type

Access

clsDatabaseLevel

R/W

clsCubeLevel

R/W

clsPartitionLevel

R

clsAggregationLevel

R

주의

If the CustomRollupExpression property is blank, member values are rolled up normally using the aggregation function of the current measure. If the property contains an MDX expression, that expression is used to evaluate each member of the level. The formulas contained in this member property are resolved in the same way as regular calculated members.

CustomRollupExpression can be set on both database and cube levels. If set on both types of levels for a given cube, the CustomRollupExpression for the cube level overrides the CustomRollupExpression for the database level. Member-specific rollup expressions in the column specified by the CustomRollupExpression for the level always override this property.

A common usage scenario for this property involves tracking inventory over time. Inventory counts do not aggregate along time dimensions, but they do aggregate along other types of dimensions, such as geography or sales. By defining a CustomRollupExpression property to use the last member of its respective level within a time dimension, closing inventory counts can be rolled up over time.

[!참고]

  Because the DISTINCT COUNT aggregation function does not support custom aggregations, the use of this aggregation function in combination with the CustomRollupExression and CustomRollupColumn properties is not supported. If a cube uses the DISTINCT COUNT aggregation function and any of the dimensions in that cube use either the CustomRollupExpression property or the CustomRollupColumn property then the cube is considered to be invalid. Processing such a cube will raise a validation error with an error code of mderrInvalidCubeDistinctCountWithCustomRollups.

For more information about CREATE MEMBER, see CREATE MEMBER Statement.