Skip to main content

Calculated Members

Calculated Members

A calculated member is based on other members. You can define two kinds of calculated members:

  • A calculated measure is a measure is based on other measures. (In MDX, each measure is a member of the Measures dimension.)

    For example, one measure might be defined as a second measure divided by a third measure.

    The phrase calculated measure is not standard in MDX, but this documentation uses it for brevity.

  • A non-measure calculated member typically aggregates together other non-measure members. Like other non-measure members, this calculated member is a group of records in the fact table.

Calculated members are evaluated after the members on which they are based.

You can create calculated members of both kinds within the cube definition, and users can create additional calculated members of both kinds within the Analyzer.

Calculated Measures

It is very useful to define new measures based on other measures. For example, in the Patients sample, the Avg Allergy Count measure is defined as the Allergy Count measure divided by the Count measure. Consider the following pivot table:

A pivot table with Allergy Severity in the rows and columns for Count, Allergy Count, and Average Allergy Count.

When this pivot table is run, the system determines the values for the Count and Allergy Count measures for each member of the Allergy Severities level; a later section of this page describes how the system does this. Then, for the Avg Allergy Count value for each member, the system divides the Allergy Count value by the Count value.

Non-Measure Calculated Members

For a non-measure calculated member, you use an MDX aggregation function to combine other non-measure members. The most useful function is %OR.

Remember that each non-measure member refers to a set of records. When you combine multiple members into a new member, you create a member that refers to all the records that its component members use.

For a simple example, consider the ColorD dimension, which includes the members Red, Yellow, and Blue. These members access the patients whose favorite color is red, yellow, or blue, respectively. You can use %OR to create a single new member that accesses all three groups of patients.

For example:

A pivot table  with a single row that is a calculated member (Primary Color) and a column for Patient Count.

See Also

See Defining Calculated Members.

FeedbackOpens in a new tab