Identify the Primary Key for a Dimension Level

Use a logical dimension table's Hierarchy tab and Primary Key field to identify the column to use as the dimension level's primary key.

You can't use a derived logical column that's the result of a LOOKUP function as part of a primary logical level key. This limitation exists because the LOOKUP operation is applied after aggregates are computed, but level key columns must be available before the aggregates are computed because they define the granularity at which the aggregates are calculated.

You can use a derived logical column that's the result of a LOOKUP function as a secondary logical level key.

If the level is in a time dimension, you can select chronological keys and sort the keys by name.

To help manage primary keys, you can go to the logical table's Columns tab, locate the column used as a primary key, and add information to its Description field.

  1. On your home page, click Navigator Navigator icon and then click Semantic Models.
  2. In the Semantic Models page, click a semantic model to open it.
  3. Click Logical Layer Logical layer icon and locate and double-click the logical table with the dimension level that you want to add a primary key to.
  4. Click the Hierarchy tab.
  5. Click to select a level below the Grand Total level.
  6. Click the Primary Key field and select a level key from the list and save changes. If only one key exists, it is the primary key by default.
  7. Click Save.