Reputation: 3029
I was exploring through Kimball's 'The data warehouse tooklit', where I came across scenario where fact table is acting as dimensions, but I wasn't very pleased with explanation mostly, because I am new to dimension modelling.
My question is
I read through this tek-tips forum, but it didn't help me well.
original source: Kimball's article
edit:
Along with above link, Kimball's aggregated facts also enabled me to ask scenario where aggregated facts is used as dimension.
Upvotes: 3
Views: 8739
Reputation: 2568
Yes, it can, and sometimes it should, depending on what you are trying to analyze, and how.
An immediate example often happens when you are analyzing sales opportunities. A sales opportunity is a direct candidate for a dimension, but if you look at it from a "analyze the sales pipeline" perspective, and especially, if you are breaking down opportunities into "opportunity stages", the SalesOpportunity will be used as a dimension for the "Sales Opportunity Stage" (the goal here is to analyze how specific sales opportunities evolve through stages) and also as a Fact (the business question in this scenario is "how many opportunities").
This article sheds some light over it: https://www.kimballgroup.com/2011/11/design-tip-140-is-it-a-dimension-a-fact-or-both/
Interestingly, Microsoft Analysis Services enables you to model tables as a dimension, fact and "both".
Upvotes: 2
Reputation: 8148
Kimball is not saying that "fact table is acting as dimensions". He is saying that numeric values can sometimes be modeled either as a dimentional attribute (a field in a dimension table), or a fact (a field in a fact table), or both.
A classic example of that is product list price, such as MSRP (manufacturer suggested retail price). Some designers will model it as fact (because it's a number - i.e., in fact table "Sales"). Others will model it as a dimesional attribite (i.e, in dimension table "Product"). What Kimball is saying is that you can have both in the same model. MSRP as a dimensional attribute can be used for filtering, while MSRP as a fact can be used to do calculations (i.e, MSRP - Sale Price = Sale Discount).
Sublte points are these:
Having it in both places gives you ultimate flexibility and simplifies use of the model, but increases ETL work. So, if you need such flexibility, it's a good design. If you only plan to use the value in one specific way, you can save yourself some data warehouse work.
Upvotes: 8