CubeField.HierarchizeDistinct Property (Excel)

Returns or sets whether to order and remove duplicates when displaying the specified named set in a PivotTable report based on an OLAP cube. Read/write

Version Information

추가된 버전: Excel 2010

Syntax

.HierarchizeDistinct

A variable that represents a CubeField object.

Return Value

Boolean

Remarks

True if the named set is displayed as ordered with duplicates removed; otherwise False.

The value of this property corresponds to the setting of the Automatically order and remove duplicates from the set check box on the Layout & Print tab of the Field Settings dialog box for a named set in a PivotTable report based on an OLAP cube.

This property returns an error if the CubeFieldType property of the specified CubeField object is not xlSet.

Example

The following code example sets the HierarchizeDistinct property to True to order and remove duplicates from the specified named set.

ActiveSheet.PivotTables("PivotTable1").CubeFields("[Summary P&L]"). _ 
 HierarchizeDistinct = True

참고 항목

개념

CubeField Object

CubeField Object Members