Thursday 3 July 2014

Factless Fact table



Factless Fact

A factless fact table is a table that contains nothing but dimensional keys.

There are two kinds of factless fact tables:
  • Factless fact table describes event 
  • Factless fact table describes condition.

Factless fact table for event
You often find that you want to track events or activities that occurs in your business process but you can’t find measures to track.  In these situations, you can create a transaction-grained fact table that has no facts to describe that events or activities.

Example
For example, you may want to track employee leaves.
At the center of diagram below is the FACT_LEAVE table that has no facts at all. However the FACT_LEAVE table is used to measure employee leave event when it occurs.


Factless Fact Table - Example 1

The following SQL statement is used to count number of leaves that  and employee has been taken:

Select employee_name as name,count(leave-type_id) as leave from fact_leave ,Dim_employee where fact_leave.employee_id = Dim_employee.employee_id.


Factless fact table for condition:
It is used to support negative analysis report, Factless fact table can be also used in these situations:


For example a store  that  did not sell product for a given period, to make this report you must have a fact table to capture all combinations:


 




No comments:

Post a Comment

A fatal error occurred while processing the request. The server responded with: FOProcessor cannot run without a valid TMP directory. Please check if TMP directory exist and write enabled.

When attempting to export a Dashboard to Excel the following error message in sawlog is found: A fatal error occurred while processi...