Skip to content

Latest commit

 

History

History
52 lines (29 loc) · 1.54 KB

Excel.CubeField.HierarchizeDistinct.md

File metadata and controls

52 lines (29 loc) · 1.54 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
CubeField.HierarchizeDistinct property (Excel)
vbaxl10.chm668104
vbaxl10.chm668104
Excel.CubeField.HierarchizeDistinct
714f85b7-2adb-0ec1-5203-ca797b21e0a8
04/23/2019
medium

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.

Syntax

expression.HierarchizeDistinct

expression 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 (XlCubeFieldType enumeration).

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

[!includeSupport and feedback]