- Terminology
- Pivoting Cube Data
- Member Names and Keys
- Calculated Members
- Member Properties
- Summary
Member Names and Keys
Now let's examine the left pane of the Cube Editor. This pane displays cube dimensions, measures, calculated members, calculated cells, actions, and named sets. For this example, click on the Customers dimension and then navigate to the Name level. In the Properties box on the bottom of the left pane you'll see the Member Key column and the Member Name column properties, as shown next:
What is the difference between the two? Within Analysis Services, you can look up the dimension member by using either its key or name. In MDX, you can refer to a dimension member by specifying its name or by appending "&" to the key of that member. Hence the Foodmart database uses Customer.customer_id as the Member Key column and customer.fname + '' + customer.lname as the Member Name column. Data retrieval usually works faster if you know the key; however, there will be times when you don't know the keyif so, you can use the Name column to get to the same data. For example, using the sales cube, you can get the same information by using the following MDX:
SELECT {[measures].members } ON COLUMNS, {[customers].[name].&[1058]} ON ROWS FROM sales
Or
SELECT {[measures].members} ON COLUMNS, {[customers].[name].[amy petranoff]} ON ROWS FROM sales
The output in both cases would be the following:
Whether you use member names or keys in your MDX queries depends on the parameters you can collect from your users.