Questions tagged [fact]

A fact or fact table is the central table in a Star or Snowflake schema of a data warehouse. A fact table stores quantitative information for analysis and is often denormalized. It measures the business operations in the organization. It is included in every data warehouse or data mart.

A fact or fact table is the central table in a Star or Snowflake schema of a data warehouse. A fact table stores quantitative information for analysis and is often denormalized. It measures the business operations in the organization. It is included in every data warehouse or data mart.

Facts are the measurements that result from a business process event and are almost always numeric. A single fact table rows has a one-to-one relationship to a measurement event as described by the fact table's grain. Fact table corresponds to a physical observable event.

Within a fact table, only fact consistent with the decraled grain are allowed. The fact table work with dimension tables. The fact table holds the ways in which the fact table data can be analyzed. There are two type of columns in there - foreign key columns for join with the dimensions and the measures columns, containing the data analyzed.

Example

In retail sales transaction, the quantity of a product sold and its extended price are good facts. Store manager's salary is disallowed in the fact table.

Links

182 questions
0
votes
1 answer

Data Warehouse - How to create a Fact Table interecting all dimensions with R and/or SQL

I am trying to create a Fact Table using 4 dimensions and 2 Files and i haven't been able to connect all the information. I usually work with python but now i must use this with R and SQL. I know exactly how i should connect all the info, but i…
PythagorasDoe
  • 55
  • 2
  • 2
  • 8
0
votes
1 answer

Sale target (aka Budget) fact with dim hierarchy where parent's measure is less than sum of it's children's measures

My org has a need to build a data warehouse in SQL Server (and eventually a cube in SSAS) where one of the fact tables is for sale target / budget data. Till date, I've only handled the opposite of this problem, whereby sum of children's values is…
0
votes
1 answer

Populating fact table

I've a data warehouse for sales, it has 3 dimensions [product,time,store] and a fact table [sales_fact]. Primary key of 'sales_fact' table is made up of all primary keys of dimensions table, dimension tables are all filled up manually now I want to…
vatob
  • 53
  • 1
  • 10
0
votes
1 answer

Should I combine the columns of a fact table to make it more narrow, or should I keep it more user friendly with a lot of columns?

I have a Fact table that shows the results of KPIs. There are several KPIs, and some of these have a similar output. My current columns are something like this: KPI_ID, DOCUMENT_ID, TRUE_FALSE_FLAG1, TRUE_FALSE_FLAG2, DURATION_3, DURATION_4 So,…
0
votes
1 answer

Update and delete records in the fact table

I have a fact table with five dimension tables associated to it.Typically, the fact table contains the surrogate keys of each dimension and has no business/surrogate key. I am trying to load the fact table with data resulted of the staging fact…
Dodi
  • 111
  • 4
  • 14
0
votes
1 answer

Core/Custom Fact Table

I have a fact table defined at the order/line grain. Each order belongs to a certain vertical and each vertical has custom attributes for describing it's data. I want to be able to allow users to query across all orders regardless of vertical but…
user3776554
  • 119
  • 4
0
votes
1 answer

Can non-additive facts be part of transactional fact table

I know there are three types of facts, and I've read that Transactional-Fact tables have fully additive facts which are the most useful type, but can non-additive facts be there as well? Or even semi-additive facts for that matter. I'm asking this…
jruivo
  • 447
  • 1
  • 8
  • 22
0
votes
1 answer

Delete the first fact that fulfills a condition in Prolog

I want to delete the first fact that fulfills my condition in Prolog. I tried to delete one and only one of the five facts that its number not equal to my goal. My goal here is to keep the cards with number 4. The cuts operation doesn't work with…
Reem Aljunaid
  • 109
  • 1
  • 9
0
votes
1 answer

User input to create factorial

Need some help on making the def fact(n) command to work off user input. My script works great when I input something like "Ruby factorial.rb 5". However, I need this to run with prompts. The script should run something like: puts 'Please input a…
0
votes
1 answer

Understanding Slowly Changing Dimension Type 2

I am having difficult time understanding how to use slowly changing dimension type 2, in my scenario. I have gone through different tutorial websites but they don't fit. I have an employee dimension table…
Miru
  • 158
  • 10
0
votes
1 answer

CLIPS negative condition

I'm looking for a way to delete facts based on a negative condition. For example after creating the following facts: CLIPS> (deffacts Cars (color red) (color green) (color yellow) (doors three) (doors five)) CLIPS> (defrule…
Selrac
  • 2,203
  • 9
  • 41
  • 84
0
votes
1 answer

set_fact is not persisting

I am using ansible 2.0.1 on RHEL 7 hosts. Somehow following roles when called through playbook skips the Get the yellow major version. Attaching output below. Looks like there is something wrong with the when condition. - set_fact:…
Gaurav S
  • 121
  • 15
0
votes
1 answer

Scenario where properties have a dependency on the Fact values

Need clarification regarding the statement that Problem fact class is used by the score constraints, but does NOT change during planning (as long as the problem stays the same). Can Optaplanner handle scenarios (and return optimzed solution) where…
Manish
  • 47
  • 5
0
votes
1 answer

MDX calculated measure by dimension value

I have to filter the measure value by a value in a the article group dimension. Starting point: Facts: Inventory (only opening stock of a month) Sales Dimensions: Articlegroup (content: articlegroup types: Service or not) Article Time We have 2…
Blin4ik
  • 3
  • 3
0
votes
1 answer

Use of natural key in date dimension

I am trying really hard to understand the concept of having natural keys in date Dimension table. I have always seen a random surrogate keys being created in the dimension tables. But I have recently read that using a natural key in date dimension…
imba22
  • 651
  • 1
  • 13
  • 25