DEV Community

Cover image for SCHEMAS AND DATA MODELLING IN POWER BI
@waruikelvin
@waruikelvin

Posted on

SCHEMAS AND DATA MODELLING IN POWER BI

Power BI Data Modeling

Introduction to Power BI and Data Modelling

Power BI is a widely used business intelligence and data visualization tool that enables organizations to analyze data and make informed, data-driven decisions. To fully leverage its capabilities, it is essential to understand how data is structured and organized within the Power BI environment.

Data modelling plays a central role in Power BI by defining how data tables are designed, connected, and optimized for analysis. Concepts such as fact and dimension tables, star and snowflake schemas, and table relationships form the foundation of an effective data model. A well-structured data model not only improves report performance and accuracy but also simplifies analysis and enhances the overall user experience.

This article explores key schemas and data modelling concepts in Power BI, including fact and dimension tables, star and snowflake schemas, and the importance of proper relationships, while highlighting why good data modelling is critical for performance and accurate reporting.

Terms You Will Find in This Article

  1. Data Modelling – The process of structuring data into tables and relationships to support efficient analysis and reporting.
  2. Fact Table – A table that stores measurable, quantitative data such as sales, revenue, or quantities.
  3. Dimension Table – A table that stores descriptive attributes used to filter, group, and categorize fact data.
  4. Star Schema – A data model design where a central fact table is directly connected to multiple dimension tables.
  5. Snowflake Schema – A normalized version of the star schema where dimension tables are split into additional related tables.
  6. Relationships – Logical connections between tables that control how data is filtered and aggregated.
  7. Cardinality – The definition of how rows in one table relate to rows in another table.
  8. Cross-Filter Direction – The direction in which filters flow between related tables. 9 DAX (Data Analysis Expressions) – A formula language used in Power BI to create calculations and measures.

What Is Data Modelling in Power BI?

Power BI data modelling is the process of structuring data in a logical and organized way to support accurate analysis and reporting. This process includes loading and cleaning data, defining relationships between tables, and creating DAX calculations.

Using the right data modelling techniques ensures clean relationships, reliable KPIs, and a strong foundation for self-service analytics across an organization. When discussing data modelling, the most commonly referenced approach is the star schema, which is also the recommended modelling technique in Power BI.

Understanding Fact and Dimension Tables

Fact and Dimension Tables

A fact table contains measurable values that can be summarized and aggregated, such as sales amount, quantity, or revenue. It also includes one or more keys that link the fact table to related dimension tables.

For large or complex data models, it is recommended to use numeric keys rather than text strings, as numeric keys generally improve model performance. Fact tables should be narrow, containing only essential measurable fields.

Columns that describe attributes, such as ProductName or ProductCategory, should be stored in dimension tables. This separation process, known as data normalization, reduces redundancy and improves performance.

Dimension tables describe the features of the data. They contain unique values and are responsible for filtering, grouping, and labeling data in Power BI reports.

The Star Schema in Power BI

Star Schema

The star schema is the most commonly used and recommended schema in Power BI.

Benefits of the Star Schema

  • Usability: Produces a clean and easy-to-understand data model.
  • Performance: Fewer joins result in faster queries and more efficient DAX calculations.

How a Star Schema Works

A star schema consists of a central fact table with dimension tables directly connected to it. While it is ideal to have a single fact table, multiple fact tables can be used when required.

Use Case: Star schemas are ideal for dashboards and summary reports where fast query performance is critical.

Note: A star schema does not need to visually resemble a star. Some layouts are preferred because they make filter propagation easier to understand.

Star Schema non-star shaped

The Snowflake Schema

Snowflake schema

The snowflake schema is an extension of the star schema. In this approach, dimension tables are further normalized into additional related tables. For example, a Products table may be split so that product categories are stored in a separate table. This reduces redundancy but increases the number of joins.

Use Case: Snowflake schemas are useful when storage efficiency is important, but they may reduce performance due to additional joins.

Relationships in Power BI Data Models

Relationships define how tables are connected within a Power BI model. These logical connections control how filters and calculations behave across tables and visuals. A well-designed data model relies on correctly defined relationships to ensure accurate and reliable reporting.

Creating Relationships in Power BI

Relationships can be created in two ways:

  1. Drag a field from one table onto a related field in another table.
  2. Use Manage Relationships from the ribbon to define relationships manually.

Although Power BI attempts to automatically detect relationships, these should always be reviewed to ensure correctness.

When setting up relationships in Power BI, there are two important options to pay close attention to: cardinality and cross-filter direction. These settings control how tables interact and how filters move through your data model. Getting them right makes a noticeable difference in report accuracy and performance. Let’s take a closer look at each of them.

Cardinality

Cardinality relationship

Cardinality defines the type of relationship between two tables.

Common cardinality types in Power BI include:

  • One-to-Many (1:*) – The most common and recommended relationship, where one dimension value relates to many fact rows.
  • One-to-One (1:1) – Used when both tables contain unique values.
  • Many-to-Many (*:*) – Used in advanced scenarios but generally avoided due to increased complexity.

Use Case: One-to-many relationships are well-suited to star schema designs.

Cross-Filter Direction

Cross-filter direction

Cross-filter direction determines how filters propagate between related tables.

Options include:

  • Single Direction: Filters flow from the dimension table to the fact table (recommended).
  • Both Directions: Filters flow in both directions and should be used cautiously.

Use Case: Single-direction filtering is ideal for star schemas. Both-direction filtering is recommended only for specific analytical scenarios where filter propagation must flow both ways.

Importance of Good Data Modelling for Performance and Accuracy

Good data modelling is the backbone of effective Power BI reporting. The way data is structured, connected, and optimized directly affects how fast reports load, how accurate calculations are, and how easy dashboards are to maintain over a period of time.

1. Performance Optimization

A well-designed data model minimizes unnecessary complexity. Using schemas such as the star schema, keeping fact tables narrow, and avoiding redundant columns reduces the number of joins Power BI must process. This results in faster visuals, smoother interactions, and quicker data refreshes, especially when working with large datasets.

Real-world example (Sales): In a sales dashboard, a star schema with a single Sales fact table connected to Date, Product, and Customer dimensions allows totals and trends to calculate instantly. In contrast, mixing product attributes directly into the fact table often leads to slower visuals and inconsistent aggregations.

2. Accuracy and Consistency

Good data modelling ensures calculations return accurate and consistent results. Correct relationships, proper cardinality, and well-defined filter directions prevent issues such as duplicated values, missing records, or incorrect totals.

Real-world example (Finance): In financial reporting, an incorrect many-to-many relationship between transactions and accounts can cause revenue or expense figures to be overstated. A properly modelled one-to-many relationship ensures that balances reconcile correctly with accounting records.

3. Simpler DAX and Easier Maintenance

When the data model is clean, DAX measures become simpler and more readable. Dimension tables naturally filter fact tables, reducing the need for complex DAX logic.

Real-world example (HR): In an HR report, separating employee attributes (department, role, location) into dimension tables allows metrics such as headcount, attrition, and tenure to be calculated with straightforward measures instead of complex filters.

This simplicity makes models easier to maintain, troubleshoot, and hand over to other developers or analysts.

Common Power BI Modelling Pitfalls

Poor data modelling often leads to:

  • Slow report performance due to unnecessary joins
  • Incorrect totals caused by wrong cardinality or filter direction
  • Overly complex DAX measures trying to “fix” modelling issues
  • Difficulty scaling the model as new data or requirements are added NOTE: Many Power BI performance and accuracy problems are not caused by visuals or DAX, but by issues in the underlying data model.

4. Scalability and Reusability

A strong data model is easier to scale as data volumes grow or business needs change. New visuals, measures, or even additional datasets can be added without redesigning the entire model. Well-modelled datasets can also be reused across multiple reports, saving development time and ensuring consistency.

Conclusion

Schemas and data modelling form the foundation of effective Power BI reporting. Understanding fact and dimension tables, choosing the appropriate schema, and defining correct relationships directly impact performance, accuracy, and scalability.

The star schema remains the preferred approach for most Power BI solutions due to its simplicity and efficiency, while the snowflake schema serves specialized use cases. Ultimately, good data modelling enables reliable analytics, scalable reporting, and better decision-making.

In short, good data modelling is not just a technical best practice; it is essential for building fast, accurate, and trustworthy Power BI solutions that support confident, real-world decision-making.

Great reports are built on great data models!

Top comments (2)

Collapse
 
kahindikv profile image
Kahindi Kevin

You did great with this write-up.
I found it interesting as it is a key output to understanding schemas.
However, you failed to look into the strengths and weaknesses of the schema types and how they affect the models developed.
This could be an idea of what to write next.
Thank you!

Collapse
 
wk-warui profile image
@waruikelvin

Thank you, Kev. I'll make sure to look into the strengths and weaknesses of the schema types. Thank you for your insights, sir.