Having made the
illustrative enhancements to the Customer dimension, let's turn now to
the Product dimension.
First, let's provide
some hierarchical information regarding our products. For the purposes of our
example, let's say that, based upon the requests of information consumers, we
want to provide product class and category information -- information that we
realize does not appear in the products table. We will insert another table, product_class,
as part of meeting this requirement.
Click Insert on the top
Select Tables on the
Select Table dialog appears.
Select the product_class
table, noting that the column list appears to the right in the Details
section of the dialog, as shown below.
Illustration 48: Account No Level of the Customer Dimension
Click Add to add the product_class
table to the schema pane.
Click Close to dismiss
We note that the product_class
table, joined to the product table via the product_class_id
column, appears in the schema pane.
Drag the following fields from
the product_class table over to drop onto the folder for the SKU level
we defined earlier, in the order shown:
Dragging the above onto
the folder precisely in the order shown will result in their alignment as shown
Illustration 49: Product Dimension with New Member Additions
Right-click on each of the
above newly added dimension members, and rename each, respectively, to the
Select the Basic tab in
the Properties pane for the SKU level.
Click the Member Name Column
Type the following into the
CStr("product"."SKU")+ ' - ' + "product"."product_name"
The above expression again uses the
VBA CStr function to convert the SKU field to a string that we
can concatenate with the product name, much in the way we used it in the
Customer dimension above. While the layout would depend upon the
requirements of the information consumers, the point of the example is to show
that such expressions can be accommodated within the Member Name Column
field of the Properties pane. We would be able to precede the SKU
identifier, sort by the product name instead of the SKU, and so forth
relatively easily. (Combining different fields, as we have in our example, might
make reporting and browsing easier from different information consumer
Page 12: The Cube Editor (Continued)
See All Articles by Columnist William E. Pearson, III