Class CalculatedMember (Excel VBA)
The class CalculatedMember represents the calculated fields, calculated items, and named sets for PivotTables with Online Analytical Processing (OLAP) data sources.
Dim clcm as CalculatedMember
Set clcm = ActiveCell.PivotTable.CalculatedMembers(Index:=1)
For Each
Here is an example of processing the CalculatedMember items in a collection.
Dim clcm As CalculatedMember
For Each clcm In ActiveCell.PivotTable.CalculatedMembers
Next clcm
Methods
Delete - Deletes the object.
Properties
Name (Default member) - Returns a String value that represents the name of the object.
DisplayFolder returns the display folder name for a named set.
Dynamic returns whether the specified named set is recalculated with every update.
FlattenHierarchies returns or sets whether items from all levels of the hierarchy of the specified named set are displayed in the same field of a PivotTable report based on an OLAP cube.
Formula returns a String value that represents the member's formula in multidimensional expressions (MDX) syntax.
HierarchizeDistinct returns or sets whether to order and remove duplicates when displaying the hierarchy of the specified named set in a PivotTable report based on an OLAP cube.
IsValid returns a Boolean that indicates whether the specified calculated member has been successfully instantiated with the OLAP provider during the current session.
MeasureGroup returns the associated measure group.
NumberFormat returns an XlCalcMemNumberFormatType value that represents the number format of the calculated member. The default value is xlNumberFormatTypeDefault.
ParentHierarchy returns the name of the current parent hierarchy from the hierarchies that are available on the cube.
ParentMember returns the name of the parent member for the parent hierarchy.
SolveOrder returns a Long specifying the value of the calculated member's solve order MDX (Mulitdimensional Expression) argument. The default value is zero.
SourceName returns a String value that represents the specified object's name as it appears in the original source data for the specified PivotTable report.
Type returns an XlCalculatedMemberType value that represents the calculated member type.