Model data in Power BI


Introduction        

 Power BI is simple and fast enough to connect to an Excel workbook or a local database. It can also be robust and enterprise-grade, ready for extensive modeling and real time analytics. This means it can be used in a variety of environments from a personal report and visualisation tool to the analytics and decision engine behind group projects, divisions, or entire corporations.

        As Power BI is a Microsoft product and has built in connections to Excel, there are many functions that will be familiar to an Excel user.

A data model can be defined as the organisation and relationships of a set of two or more data tables.

There are several ways to represent data models, one of the most commonly used method is the Entity-Relationship Diagram (ERD).

Power BI’s data model view represents the report’s data model with an ERD:




In power BI desktop The Model view in Power BI Desktop allows you to visually set the relationship 

between tables or elements. A relationship is where two or more tables are linked together because

they contain related data. This enables users to run queries for related data across multiple tables.

Use the Model view to see a diagrammatic view of your data.





Manage Relationship 

The Manage Relationships dialog box displays your relationships as a list instead of as a visual diagram.  From the dialog box, you can select Autodetect to find relationships in new or updated data. Select Edit to manually edit your relationships. You'll find advanced options in the Edit section to set the Cardinality and Cross-filter direction of your relationships.





A data relationship’s cardinality describes the numerical relationship between rows of one table and 

the rows of the other. The main cardinalities include:


one-to-one: one-to-one cardinality indicates that each row of a table maps to a single row of another table

one-to-many (or “many-to-one”): one-to-many relationships are very frequent in traditional star-schemas. One-to-many relationships occur when a single row of a table maps to more than one row in another table. This is the case of the example relationship studied above


many-to-many: many-to-many relationships are very tricky to deal with. They occur when multiple rows in one table link to multiple rows in another.


Benefits of model view in power bi 

1) Power BI Desktop is the regular updates it gets almost every month.

2) the Model View is to provide the visual representation of the relationships (type & direction) among the tables.

3) Model view to give a structured look to our Power BI data model.

4) We can also drag and drop columns in the already created folder. 


Comments