DEV Community

Cover image for Schemas and Data Modelling in Power BI
Samuel Wachira
Samuel Wachira

Posted on

Schemas and Data Modelling in Power BI

Introduction

Data modelling is one of the most critical aspects of building effective Power BI solutions. A well-designed data model ensures fast report performance, accurate calculations and meaningful insights for decision-makers. Power BI relies heavily on how data is structured, relate and optimized before any visuals are created. I will explore schemas and data modelling in Power BI; focusing on star schema, snowflake schema, fact and dimension tables, relationships and why good modelling is essential for performance and accurate reporting.

Data Modelling in Power BI

Data modelling refers to the process of organizing data into tables, defining relationships between them and structuring the data in a way that supports efficient analysis. In Power BI, the data model directly affects:

  • Query performance
  • DAX calculation accuracy
  • Simplicity of report design
  • Scalability of reports as data grows

1. Fact and Dimension Tables

a) Fact Tables

A fact table stores quantitative, measurable data that businesses want to analyze. These values are often numeric and can be aggregated.

Characteristics of fact tables:

  • Contain metrics (e.g. Sales Amount, Quantity, Revenue)
  • Usually very large
  • Contain foreign keys linking to dimension tables
  • Represent business events (sales, transactions, clicks)

Example:
FactSales

  • SaleID
  • DateKey
  • ProductKey
  • CustomerKey
  • SalesAmount
  • Quantity

b) Dimension Tables

A dimension table provides descriptive context for facts. These tables answer questions like who, what, where, and when.

Characteristics of dimension tables:

  • Contain descriptive attributes
  • Smaller than fact tables
  • Used for filtering, grouping, and slicing data
  • Have primary keys referenced by fact tables

Example:
DimProduct

  • ProductKey
  • ProductName
  • Category
  • Brand

2. Star Schema

A star schema is a data modelling structure where a central fact table is connected directly to multiple dimension tables, forming a star-like layout.

Structure

  • One central fact table
  • Multiple dimension tables
  • One-to-many relationships from dimensions to fact

Advantages

  • High performance: Optimized for Power BI’s VertiPaq engine.
  • Simple relationships: Easier to understand and maintain.
  • Accurate DAX calculations: Fewer ambiguous filter paths.
  • Better user experience: Business users can easily navigate fields.

Example

DimDate      DimCustomer     DimProduct
    \             |              /
              FactSales
Enter fullscreen mode Exit fullscreen mode

Why Power BI Prefers Star Schema

  • Reduces model complexity
  • Minimizes relationship issues
  • Improves query execution speed

3. Snowflake Schema

A snowflake schema is a variation of the star schema where dimension tables are normalized into multiple related tables.

Structure

  • Fact table connects to dimension tables
  • Dimension tables further connect to sub-dimension tables

Example

FactSales
   |
DimProduct
   |
DimCategory
Enter fullscreen mode Exit fullscreen mode

Advantages

  • Reduced data redundancy
  • Better storage efficiency in some databases

Disadvantages

  • Slower performance due to extra joins
  • More complex DAX calculations
  • Harder for report users to understand
  • Increased risk of incorrect filtering

Power BI Recommendation

Snowflake schemas are not ideal in Power BI. It is usually best to denormalize snowflake dimensions into flat dimension tables and convert them into a star schema.

4. Relationships in Power BI

Types of Relationships

Power BI supports several relationship types:

  • One-to-Many (1:*) – Most common and recommended
  • Many-to-Many (:) – Use cautiously
  • One-to-One (1:1) – Rare

Relationship Direction

  • Single-direction filtering (recommended)
  • Both-direction filtering (use only when necessary)

Poor relationship design can cause:

  • Incorrect totals
  • Ambiguous filter paths
  • Performance degradation

Why Good Data Modelling Is Critical

1. Performance Optimization

A clean star schema:

  • Reduces memory usage
  • Speeds up report loading
  • Improves interaction responsiveness

2. Accurate Reporting

Proper relationships ensure:

  • Correct aggregations
  • Accurate filters and slicers
  • Reliable DAX calculations

3. Simpler DAX

Well-structured models:

  • Reduce complex DAX logic
  • Prevent calculation errors
  • Improve maintainability

4. Scalability

Good models can handle:

  • Growing datasets
  • Additional dimensions
  • New business requirements without redesign

5. Better User Experience

Business users can:

  • Easily understand fields
  • Build reports without confusion
  • Trust the numbers presented

Best Practices for Power BI Data Modelling

  • Use star schema whenever possible.
  • Keep fact tables numeric and transactional.
  • Flatten dimension tables.
  • Avoid many-to-many relationships unless necessary
  • Use single-direction filtering
  • Hide technical keys from report view
  • Rename fields with business-friendly names

Conclusion

Schemas and data modelling form the foundation of effective Power BI solutions. The star schema supported by clearly defined fact and dimension tables and well-managed relationships, delivers optimal performance, accurate reporting and maintainable models. While snowflake schemas may be suitable in traditional databases, Power BI performs best with simplified, denormalized star models. Investing time in good data modelling is essential for building scalable, reliable, and high-performing Power BI reports.

Top comments (0)