Define a Calculated Measure

You can create a calculated measure to derive new numeric data from regular measures, other calculated measures, functions, and constants.

You can specify the format for the result, and also explain the calculation in the Description box on the Measure property sheet, so that your users can see how the data was derived.

For example, you create a calculated measure for Profit Margin by subtracting Cost from Revenue and dividing the result by Revenue. You select 0% on the Format tab, so that the results of your calculated measure are expressed as percentages. For an item costing 2000 with a revenue of 4000, your users see a Profit Margin of 50%.

After you create a calculated measure, you can control whether the measure is calculated before or after rollup.

All calculations defined in a cube are performed based on built-in rules of precedence. Where there are intersecting calculations, the after-rollup calculations defined for all measures are performed first. These are followed by calculations for calculated categories, and then by dynamic and regular rollups. This is important information for your users, who need to understand the results they are seeing in the intersecting cells of their crosstab reports.

Procedure

  1. Click the Measures list to make it active and, from the Edit menu, click Insert Measure.
  2. In the Measure name box, enter a name for the measure.

    The measure name must be unique in the model.

  3. Select the Type tab, click Calculated and then click Calculation.
  4. In the left pane of the expression editor, expand the Functions and Measures folders as needed, select each parameter you want to use and click the right-arrow button to insert it into the Expression definition box in the right pane of the editor.
  5. When the expression is complete, click OK.
  6. Type or select the other features you want for the measure, such as the description and format and click OK.

    Your new calculated measure appears in the Measures list.