DEV Community

Cover image for Understanding Schemas and Data Modelling in Power Bi
Brian Nyamwange
Brian Nyamwange

Posted on

Understanding Schemas and Data Modelling in Power Bi

Introduction.

Power Bi is a data visualization tool used by organizations to turn data into actionable data focused decisions,in this article we will focus on the various schemas and data modelling in power bi.

What is a schema in Power Bi?

A schema in power Bi basically refers to the structure and organization of tables,data type and relationships within a data model.

Types of schemas in power bi.

Star Schema.

A star Schema is a type of schema where a fact table is surrounded by dimensional tables forming a star like pattern.


The central fact table contains quantitative data e.g sales,quantity sold and profit while the dimensional tables will contain information about the products,regions and customers.

Snowflake

A snowflake schema is an extension of the star schema, it contains the fact table that extends to dimensional tables which are further broken down to sub dimensions.


In a snowflake schema, the fact table contains quantitative data,the dimensional tables will contain information about products,regions and customers,the sub-dimensional tables will contain information such as product category.

Data Modelling in power Bi.

Data modelling structures raw data collected and identifies the relationship between the data.
In power BI data modelling helps with detremining how data is structured,related and interpreted for analysis,reporting and visualization.

Fact Tables and Dimension Tables

Fact Table

A fact table in contains the quantitative information that needs to be analyzed,it includes keys that link to dimensional tables.

Dimension Table.

Dimension Tables give us the information required to categorize,filter or group information in the fact table.
Dimension tables contain information such as product,channel,orderdates etc. basically the dimension table describes who,what,where and when.

Relationships in Power Bi.

Relationships in power bi defines how tables related to each other.

Core Relationship Types in Power Bi.

  • Many to one- a table with multiple instances for example sales and relates to a table unique values for example products.

  • one to many- It is the reverse of the many to one.

  • One to One -Used when two tables have unique values for the key column.
    Many to Many -Handles situations where both tables contain duplicates,often requiring bridging tables.

    key relationships concepts.

  • Cardinality- refers to the type of relationships.

  • Cross filter Direction-Determines how filters flow.

  • Active vs Inactive- A model having multiple relationships between tables but only one is active.

Why Good is critically for performance and Accurate Reporting.

Good Modelling Ensures that data is accurate,easily accesible,consistent avoiding situations where poor data leads to poor decision making.
Good modelling can:

  • Enhances Scalability- as data grows a ggod model scales efficiently without degrading performance and makes reports easier for others to understand.

  • Optimized query speed- well designed models like star schema allows databases to retrieve information faster.

  • Reduces Errors-by creating clear relationships upfront,you prevent data inconsistencies.

In conclusion Data modelling in power bi is the root of effective analyticsunderstanding fact and dimension tables,using schemas and defining relationships ensures better performance and accurate Reporting.

Top comments (0)