[Mondrian] Degenerate facts

julianhyde at speakeasy.net julianhyde at speakeasy.net
Wed Jul 18 15:41:17 EDT 2007

> Matt Campbell wrote:
> There are times where it is desirable to treat dimensional data as fact data. 
> For example, you may want to report on "Store Sqft" dimensionally (to view
> Profit by Store Sqft, for example), or you may want to sum or average the
> value (to get the total Store Sqft by Warehouse).  Similarly for a dimension
> like "Age"--you may want to view a sum or average of ages, or view a breakdown
> by age.
> Has there been any consideration of adding support for degenerate facts to
> Mondrian?

Three ways:

1. Create a cube on the dimension (at which point, I guess it will have become a degenerate dimension), then join it into  a virtual cube.

2. You could map the column as a dimension property, then expose it as calculated member. That's probably the simplest. Please post some MDX if you get that working.

3. As a future feature, we could extend the catalog.xml syntax to allow measures to be defined in tables other than the fact table. This is not trivial, because if they are in a different table, you need to specify a join path so mondrian would know how to get to the column. I've been thinking about separating the relational model (which specifies tables, SQL expressions, and join paths) from the dimensional model (which defines cubes and dimensions) within the catalog.xml file, and that would provide that metadata. There are a bunch of good reasons to do that separation, and this is one more.


PS By the way, if you google 'mondrian degenerate', you get a rather interesting history of pre-WWII art.

More information about the Mondrian mailing list