Skip to main content

Data Modelling in Power BI

 Modelling is a process to get your connected data for visualization. Basically, in modelling, you will connect to multiple data sources to create your reports.

 Now the question is "How to connect multiple data sources to create a report?"

 So, the answer is "You can create a relationship to create a logical connection between different data sources". A relationship enables Power BI to connect tables to one another so that you can create reports.

How to Create a Data Relationship?


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 with one or more join key(s) because they contain related data.

In the Model view, notice that a block represents each table and the lines between them represent relationships.


Adding and removing relationships is straightforward. To remove a relationship, right-click the relationship and select Delete. To create a relationship, drag and drop the fields that you want to link between tables.


To hide a table or individual column from your report, right-click the table or column in the Model view and select Hide in report view.



Cardinality optionsExample
Many to OneThe most common default relationship. The column in one table can have more
than one instance of a value. The related table (or lookup table) has only one
instance of a value.
One to OneThe column in one table has only one instance of a particular value, and the other
related table has only one instance of a particular value.


Note : Generally, we recommend minimizing the use of bi-directional relationships. They can negatively impact model query performance, and possibly deliver confusing experiences for your report users.



Comments

Popular posts from this blog

ETL Process in Power BI

 We can make a data analysis process easy using the ETL process in Power BI Desktop.  What is ETL in Power BI Desktop ? ETL (Extract, Transform and Load) data is a process by which we can change the shape of our dataset. You can perform several operations in Power Query editor.  During the ETL process, data is extracted from a data source (raw data), then transformed, corrected and then loaded for the next step. You can do this process manually in Excel but it is time consuming process and at the end of the day, we don't want to do the same process for upcoming new data. It should be done by automation. If you have not read my last blog on Power BI then please go through the link  Blog We will start the ETL process step by step A. Extract Data  B. Transform Data C. Load Data A. Extract Data from a data source To extract data from a data source, click on Get Data. We will extract raw data from Excel sheet and then will connect the sheet with Power BI. You can ext...

Excel for Data Analysis

 Most important functions of Excel for data analysis Excel and google sheets are powerful tools for managing the raw data. There are many functions that can make your task easier.  As a Data Analyst, you use many functions like VLOOKUP, Pivot Tables, Conditional formatting, etc., So here, I have listed some most important functions of excel for data analysis : - 1. Pivot Table Pivot tables are a way to aggregate data to look at smaller subsets without using manual filters. Without it, you would use the manual filters on every column, check to see if they work, and then use [SUM] functions. All of that is built for you with a pivot table and pivot chart. You can set rows, columns, values and filters at the same at your level. You can use any aggregate function while creating a Pivot table.  In short, Pivot table gives you the summary of your data. We will see more detail in next blog. 2. VLOOKUP VLOOKUP stands for "Vertical Lookup", this means the act of looking up da...

Get started with Power BI Desktop

The very first question comes in mind is Should I use Power BI Desktop or Power BI Service to create a dashboard ? You should get started with Power BI Desktop. As I have already told in the first blog ( Blog 1 ) that the flow of creating a report is    Power BI Desktop > Power BI Service > Power BI Mobile