Introduction to Model view in Power BI

In this exercise, we will learn about the Model view in Power BI Desktop. In Model view we can view and work with complex semantic models that contain many tables.

To access Model view, select the Model icon found on the left side of Power BI Desktop, as shown in the following image.

Model View in Power BI
Create a Relationship in Power BI In the Power BI, we can create a relationship between the two tables by two ways: • To create a relationship, drag the field from one table and drop the field on the field of the other table that we want to link. • Click on the Home tab, select Manage Relationships. The Manage Relationships dialog box displays our relationships as a list instead of as a visual diagram.
Model View in Power BI
The dialog box of the “New relationship” open as shown in the image below:
Model View in Power BI

In the Model view, the lines between the tables represent relationships. The arrow on the relationship line, represents the filter direction.

Model View in Power BI

So, it means the ‘Students Table’ is filtered by the ‘Branch Table’, but ‘Branch Table’ is not filtered by ‘Students Table’. The ‘Branch Table’ and ‘Teacher Table’ can bidirectionally filter each other.

To remove a relationship, right-click the relationship and select Delete. When prompted to confirm the deletion, select OK.

Model View in Power BI

Click on Properties to open the Edit relationship dialog box.

Model View in Power BI

After creating the relationship, we can use the columns in the table.

Model View in Power BI

In the Model view, we have the option to hide a table or individual column from the report and select eye icon to show or hide from the report view. Also, we have the option to click on the “Is hidden” from the Properties pane.

Model View in Power BI

Alternatively, in the Model view, right-click the table or column and click on Hide in report view.

Model View in Power BI

Hide in report view makes the field inaccessible in the report tab, but still, it is available in Data and Model views.

Note: We can hide the foreign keys in the fact table and force the users to use the primary keys in the dimension tables.

Go the Data view. We can see that the hidden column is shown like in the image below:

Model View in Power BI

FACT & DIMENSION TABLES Data models generally contain two types of tables: fact (“data”) tables and dimension (“lookup”) tables:
• Fact tables contain numerical values or metrics used for summarization (sales, orders, transactions etc.).
• Dimension tables contain descriptive attributes used for filtering or grouping (products, customers, dates, stores, etc.).

Star schema and Snowflake schema In Power BI, data modeling is crucial for creating efficient and easy-to-maintain reports. Two popular schema designs we might encounter are the star schema and the snowflake schema.
• Star Schema: In Star schema the fact table is surrounded by the multiple dimension tables.
• Snowflake schema: The Snowflake schema is the extension of the Star schema; the relationship is built in between the dimension tables.