OLE DB for OLAP defines the following algorithm for flattening a dataset:
a. Let k be the lowermost level on the axis from this dimension.
b. Let Li be the set of unique names of levels above (and including) k up to (but not including) the root level. If Di has multiple members at the root level, add the unique name of the root level to Li. Li must contain unique names.
c. Case:
i. If there is a DIMENSION PROPERTIES clause in the MDX statement that created the dataset, then let Pi be the list of properties specified in this clause, enclosed in [ ] (thus, if DIMENSION PROPERTIES MEMBER_UNIQUE_NAME is specified, the Pi value contains the string "[MEMBER_UNIQUE_NAME]").
ii. Otherwise, let Pi contain the string "[MEMBER_CAPTION]".
For each element l of Li, and each element p of Pi, concatenate l and p together, separated by a period (.). Let Ci be the resulting set of compound names.
a. Each name in C is a column.
b. The levels from the highest numbered axis come first, followed by lower numbered axes.
c. Within the levels of each axis, the levels of the outermost dimension come first.
d. Within the levels of each dimension, the lower numbered levels (that is, levels at a higher degree of aggregation) come first, followed by higher numbered levels (that is, levels with a lower degree of aggregation).
Note The main idea behind a flattened rowset is that it is a quick and easy method for rowset-based consumers to display multidimensional data. Therefore, the default (without the DIMENSION PROPERTIES clause) is to return the display caption.
a. These columns appear after the columns from L.
b. Within X, the columns are in tuple order.
c. The names in X are always the unique names, regardless of whether the DIMENSION PROPERTIES clause exists or not. Consequently, any properties specified in this clause are ignored.