Search code examples
sql-serverexcelsql-server-2012ssas

SSAS 2012 - Dimension Modeling


I am working with a structure that results a lot of single attribute dimensions that require no hierarchy. Examples:

  • Status(Status Name)
  • Type(Type Name)

I get the following warning when compiling the project:

"Avoid having multiple dimensions containing a single attribute. Consider unifying them if possible."

A large number of single attribute dimensions is workable for our users, but it causes a lot of clutter in the Excel pivot table. Dimensions are listed along with the single attribute which is redundant.

single attribute dimension

I would like to unify them as the warning suggests so that I have a single dimension called 'Attributes' which contains status/type/etc, but I am unsure the best way to do so. It doesn't make conceptual sense to me with a parent/child dimension.

Any suggestions?


Solution

  • I agree this is a worthwhile change. I would construct a view that brings together the required attributes. Often they are all available on the fact/measure group table/view, so you can just use the same source object (in your DSV) to construct the dimension.

    The tricky part may be the dimension key. The most flexible key is a Fact Surrogate Key eg a unique value per Fact row - in the future you can add any other fact-based attributes without affecting the key. However this will not scale indefinitely - you are probably OK up to 1m rows at least.

    Beyond that scale, I would concatenate the attributes to form the dimension key and deliver them to a new dimension table. I would normally do this back in the ETL layer. The identical concatenation logic must be used for both the dimension and fact.