Partilhar via


How to: Add a Calculated Member for an Analysis Services MDX Query (Report Designer)

Calculated members in an MDX query represent values that do not exist directly in a data source but are calculated from cube metadata for members. You can define a calculated member and then use it like any existing member from an Analysis Services cube. For example, you can drag and drop the calculated member onto the data or filter pane in Design Mode or onto the query pane in Query mode for inclusion in an MDX query.

There are two ways to add a calculated member through the user interface: using the Add Calculated Member button on the toolbar or using the context menu from the calculated member pane.

To add a calculated member from the toolbar button

  1. In Data view, in the Analysis Services MDX Query Designer, on the query designer toolbar, click the Add Calculated Member (Add calculated member) button.

  2. In Name, type a name for the calculated member.

  3. For Parent Hierarchy, select the hierarchy under which to place this member.

  4. For Parent Member, select the member to be the parent of the calculated member.

    Note

    If Parent Hierarchy is MEASURES, Parent Member is disabled.

  5. In Expression, type the expression to use to calculate the member. You can drag objects from the Metadata and Functions lists to populate the expression with those objects.

  6. Click OK.

To add a calculated member from the calculated member pane

  1. In Data view, in the Analysis Services MDX Query Designer, below the metadata pane, right-click anywhere in the calculated member pane.

  2. Click New Calculated Member.

  3. In Name, type a name for the calculated member.

  4. For Parent Hierarchy, select the hierarchy under which to place this member.

  5. For Parent Member, select the member to be the parent of the calculated member.

    Note

    If Parent Hierarchy is MEASURES, Parent Member is disabled.

  6. In Expression, type the expression to use to calculate the member. You can drag objects from the Metadata and Functions lists to populate the expression with those objects.

  7. Click OK.

See Also

Concepts

Using Analysis Services MDX Query Designer in Design Mode
Using Analysis Services MDX Query Designer in Query Mode
Report Designer How-to Topics

Other Resources

Analysis Services MDX Query Designer User Interface
Report Designer F1 Help

Help and Information

Getting SQL Server 2005 Assistance