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.
Member in collection
To use a CalculatedMember class variable it first needs to be instantiated, for example
Dim clcm as CalculatedMember Set clcm = ActiveCell.PivotTable.CalculatedMembers(Index:=1)
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
Delete - Deletes the object.
CalculatedMembers.Add - Adds a calculated field or calculated item to a PivotTable. Returns a CalculatedMember object.
CalculatedMembers.AddCalculatedMember - Adds a calculated field or calculated item to a PivotTable.
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.
CalculatedMembers.Count returns a Long value that represents the number of objects in the collection.