How to: Modify the KeyColumn Property of an Attribute
This procedure describes how to modify the KeyColumns property of an attribute. For example, you may want to specify a composite key rather than a single key as the key for the attribute.
To modify the KeyColumns property of an attribute
In Business Intelligence Development Studio, open the project or connect to the database in which you want to modify the KeyColumns property.
Open Dimension Designer by doing one of the following:
- In Solution Explorer, right-click the dimension in the Dimensions folder, and then either click Open or View Designer.
- In Cube Designer, expand the cube dimension in the Dimensions pane and click Edit <dimension>.
In the Attributes pane of the Dimension Structure tab, 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 DataItem Collection Editor dialog box opens.
To remove an existing binding, select the binding in the Members list, and then click Remove.
To add a binding, click Add.
No source attribute is defined for a new binding. The default name for the new binding is New Binding, and the default data type for the new binding is (WChar).
If you are binding to an existing column, click the value cell for the Source property in the New Binding, WChar properties list, and then click the browse (…) button.
The Object Bindings dialog box opens.
From the Binding type drop-down list, select Column Binding.
In the Source table drop-down list, select the table that contains the attribute to which you want to bind the KeyColumns property.
In the Source column drop-down list, select the column and then click OK.
The binding name and data type are updated based on the binding attribute. The other properties have default values that you can change if appropriate. For example, you may want to adjust the collation for international environments, or change the data type to affect sort order.
If you have defined multiple attribute bindings, the order of the bindings will affect display order. For example, binding a month attribute to a month and a year column will either be sorting by year and then by month or by month and then by year, depending upon the order of the bindings.