Skip to main content

Finding the Key for a Member

Finding the Key for a Member

This section describes how and why to find the key identifier for a member.

Each member has two identifiers:

  • A name (shown in the Analyzer and pivot tables). For example, in the Patients sample, a member of the Doctor level might have the name Vivaldi, Lola

    Names are not necessarily unique.

  • A key (never displayed). This is often but not always the same as the name. For example, in the Patients sample, the doctor whose name is Vivaldi, Lola might have the key 12

    The keys should be unique in a well-defined cube. (The system does not force them to be unique, but the developers who create a cube can and should take steps to ensure their uniqueness.)

    When you create a filter by drag and drop actions, the system automatically uses the member key rather than the member name.

You should use the key when you specify a filter value manually, which you do in the following scenarios:

It is also best practice to use the key when you refer to a member in a pivot variable.

To find the key for a given member, do the following:

  1. Drag and drop the member to the Filters box in the Analyzer.

  2. Click the Display Query button on the toolbar.

    The system displays the current MDX query, which looks something like this:

    SELECT from patients %Filter DocD.h1.doctor.&[32]

    The %FILTER part specifies the filter. The [DocD].[H1].[Doctor].&[32] part is the complete member identifier for this member. The key for this member is 32.

If the level contains multiple members with the same name, and if you are not sure which member to use, try the following technique:

  1. Drag and drop each of the members to Rows.

  2. If this level has a property, drag and drop that to Columns. The property values are typically different for each member, and you can use the information here to determine which member to look at.

    Or drag and drop a level to Columns. Choose a level that can give some context.

    In other cases, it might be necessary to display a detail listing in order to correctly identify the desired member.

FeedbackOpens in a new tab