Fact Tables
Learn how Power BI fact tables store business events, measurements, and transactional data.
Fact Tables
Fact tables are the center of a Power BI star schema.
They store measurable business events and connect to dimension tables through relationships.
A fact table answers questions such as:
- How many units were sold?
- What was the total revenue?
- How many products were produced?
- How much inventory changed?
Example:
DimDate
|
|
DimCustomer --- FactSales --- DimProduct
|
|
DimStoreThe fact table contains the business events.
The dimension tables provide the context needed to analyze those events.
What Is a Fact Table?
A fact table contains:
- Numeric measurements
- Transaction records
- Foreign keys connecting dimensions
Example:
FactSales
SalesKey
DateKey
CustomerKey
ProductKey
StoreKey
Quantity
SalesAmountEach row represents a business event.
Example:
| DateKey | ProductKey | Quantity | SalesAmount |
|---|---|---|---|
| 20260101 | 1001 | 5 | 250 |
| 20260102 | 1002 | 3 | 180 |
| 20260103 | 1001 | 8 | 400 |
Fact Table Types
Power BI models commonly use several types of fact tables.
Transaction Fact Tables
Transaction facts record individual business events.
Examples:
- Sales transactions
- Customer orders
- Production records
- Inventory movements
Example:
FactSales
TransactionID
DateKey
ProductKey
CustomerKey
Quantity
SalesAmountEach row represents one transaction.
Snapshot Fact Tables
Snapshot facts capture a point-in-time measurement.
Examples:
- Daily inventory levels
- Monthly account balances
- Employee headcount
Example:
FactInventorySnapshot
DateKey
ProductKey
LocationKey
InventoryQuantityA snapshot answers:
"How much inventory existed on a specific date?"
Accumulating Snapshot Fact Tables
Accumulating snapshots track a process through multiple stages.
Examples:
- Order processing
- Manufacturing workflow
- Shipping process
Example:
FactOrderProcess
OrderKey
OrderDate
ShipDate
DeliveryDate
CompleteDateThe row is updated as the process moves through stages.
Fact Table Keys
Fact tables usually contain foreign keys.
Example:
FactSales
DateKey
ProductKey
CustomerKey
StoreKeyThese connect to dimension tables:
DimDate
|
|
FactSales
|
|
DimProductKeys allow Power BI to filter and analyze facts by different perspectives.
Measures Are Created From Facts
Most DAX measures calculate values from fact table columns.
Example:
Total Sales =
SUM(FactSales[SalesAmount])Example:
Total Quantity =
SUM(FactSales[Quantity])The measure changes based on report filters.
Example:
| Filter | Total Sales |
|---|---|
| All Products | $500,000 |
| Tires | $250,000 |
| Off Road | $150,000 |
Fact Table Design Principles
Follow these guidelines:
Keep Facts Focused on One Business Process
Good:
FactSalesContains sales events.
Good:
FactInventoryContains inventory measurements.
Avoid combining unrelated processes:
Sales + Inventory + ProductionStore Keys Instead of Descriptions
Preferred:
ProductKey = 1001Avoid:
ProductName = "All Terrain Tire"Descriptions belong in dimension tables.
Avoid Calculated Columns When Possible
Instead of storing:
TotalAmountcreate a reusable measure:
Total Sales =
SUM(FactSales[SalesAmount])Measures provide more flexibility.
Common Fact Table Mistakes
Avoid:
Mixing Different Granularities
Example:
FactSales
One row per transaction
+
Monthly totalsThese represent different levels of detail.
Create separate fact tables instead.
Too Many Columns
Avoid adding:
- Customer descriptions
- Product descriptions
- Category names
- Region names
These belong in dimensions.
Fact Table Checklist
A well-designed fact table should:
- Represent one business process
- Have a clear grain
- Contain numeric measurements
- Use dimension keys
- Support reusable DAX measures
Next Steps
Continue learning Power BI data modeling:
Advanced Topics: