Database Reference
In-Depth Information
Table 10-2. Common Attribute Properties
Property
Description
AllowDuplicateNames
Allows an attribute member name to appear more than once under the same
parent attribute. When set to True, a parent can have two children named Bob. This
is a bad idea most of the time, but if it could conceivably happen in your data, you
can leave this set to True, which is the default.
MemberKeysUnique
When set to Unique, the key values, like 1, 2, or 3, must not repeat in the user-
defined hierarchy. For example, this setting would cause an error if the Author
attribute has a key value of 1 and the AuthorState attribute has a key value of 1. The
default setting of NotUnique is the most common selection.
MemberNamesUnique
When True, the member name values must be unique. For example, setting Mexico
at the city level with Mexico at the country level causes an error. The default setting
of False is the most common selection.
Name
The logical name of the user-defined hierarchy and is displayed in most client
software.
No matter what the settings, attribute values must have some way of determining which child value belongs
to which parent value, or the user-defined hierarchy will not work. This causes problems is when dealing with
dates, because the child value of January is duplicated under the first quarter of one year as well as the first
quarter of another, thus giving January two parents.
When situations like this occur, the error displayed while processing the dimension states, “A duplicate key
has been found,” as shown in Figure 10-11 .
Figure 10-11. A typical error message when duplicate keys are found
This issue can be resolved by uniquely identifying the parent of January. Let's discuss two ways of making
this distinction.
The first method of distinguishing one value of January from another is by concatenating additional text to
the word January , such as the year. This will give each a unique value, eliminating duplication. With this method
the values will no longer all be “January”; they will be “January 2000,” “January 2001,” and so on.
If concatenating the year with the month is inconvenient for whatever reason, the second method is to
uniquely identify January's parent using a composite key. With this method, January will be identified by both its
quarter and its year. Each value has a unique parent value that defines its individuality.
To set a composite key for an attribute, access the Properties window and modify the KeyColumns property
by clicking the ellipsis (…) button that magically appears when you click the Properties window (Figure 10-12 ).
 
 
Search WWH ::




Custom Search