CustomRollupExpression (Level Interface)

ms134700.note(zh-cn,SQL.90).gif注意:
  下一版本的 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.

ms134700.note(zh-cn,SQL.90).gif注意:
  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.

请参阅

参考

CustomRollupColumn (Level Interface)
CustomRollupPropertiesColumn (Level Interface)
Level Interface

其他资源

自定义汇总运算符

帮助和信息

获取 SQL Server 2005 帮助