title | description | ms.date | ms.service | ms.custom | ms.topic | ms.author | ms.reviewer | author |
---|---|---|---|---|---|---|---|---|
Modify the KeyColumn Property of an Attribute | Microsoft Docs |
Modify the KeyColumns property of an attribute, for example to specify a composite key instead of a single key as the key for the attribute. |
05/02/2018 |
analysis-services |
multidimensional-models |
conceptual |
kfollis |
kfollis |
kfollis |
[!INCLUDEappliesto-sqlas] You can modify the KeyColumns property of an attribute. For example, you might want to specify a composite key instead of a single key as the key for the attribute.
-
In [!INCLUDEssBIDevStudioFull], open the project in which you want to modify the KeyColumns property.
-
Open Dimension Designer by doing one of the following procedures:
-
In Solution Explorer, right-click the dimension in the Dimensions folder, and then either click Open or View Designer.
-or-
-
In Cube Designer, on the Cube Structure tab, expand the cube dimension in the Dimensions pane and click Edit <dimension>.
-
-
On the Dimension Structure tab, in the Attributes pane, click the attribute whose KeyColumns property you want to modify.
-
In the Properties window, click the value for the KeyColumns property.
-
Click the browse (...) button that appears in the value cell of the property box.
The Key Columns dialog box opens.
-
To remove an existing key column, in the Key Columns list, select the column, and then click the < button.
-
To add a key column, in the Available Columns list, select the column, and then click the > button.
[!NOTE]
If you define multiple key columns, the order in which those columns appear in the Key Columns list affects the display order. For example, a month attribute has two key columns: month and year. If the year column appears in the list before the month column, [!INCLUDEssASnoversion] will sort by year and then by month. If the month column appears before the year column, [!INCLUDEssASnoversion] will sort by month and then by year. -
To change the order of key columns, select a column, and then click the Up or Down button.