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.
- On your home page, click Navigator
and then click Semantic
Models. - In the Semantic Models page, click a semantic model to open it.
- Click Logical Layer
and locate and double-click the logical table with the dimension level
that you want to add a primary key to. - Click the Hierarchy tab.
- Click to select a level below the Grand Total level.
- 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.
- Click Save.