Name

calculatedmembers.Add(Name, Formula, [SolveOrder], [Type])

Synopsis

Adds a new calculated member to the OLAP pivot table and returns the created CalculatedMember object.

Argument

Settings

Name

The name of the pivot item to create.

Formula

The MDX expression to evaluate.

SolveOrder

A number indicating the solve order of this calculation when refreshing the pivot table. Default is 0.

Type

An xlCalculatedMemberType constant. Can be xlCalculatedMember or xlCalculatedSet.

See the MDX sample application that ships with Microsoft SQL Analysis Services for help creating MDX expressions. That sample also includes Help on the MDX language.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.