Power BI can connect and load data from wide range of data sources. The data modeling capabilities of Power BI are not restricted to the type of data source.
To check the available data sources in Power BI, launch Power BI desktop and select Get data from the Home tab
Connecting to Data in Power BI using Get Data
Get Data will display the list of commonly used data sources. Navigate all the way down in the list and click on More, it will show up different data sources
Connecting and Loading Orders.xlsx
In this section, we will load Orders table which is in xlsx format.
This table in enclosed with this tutorial. Download Orders.xlsx in your c:\ or location of your choice.
This table contains, details of an order, such as, Order ID, Order date, Shipment details, Sales, Profit, Quantity, Discounts amounts.
Steps:
Connecting and Loading Products.xlsx
In this section, we will load Products table which is in xlsx format.
This table in enclosed with this tutorial. Download Products.xlsx in your c:\ or location of your choice.
This table contains details of the Products.
Steps:
Relationship between the Tables
You will notice that Power BI has automatically deducted relationship between these tables.
To explore this relationship, right-click on the relationship connector and select properties
In the next Edit Relationship screen, you will see that Power BI has created/deducted a relationship based on RowID column of the two tables.
This is incorrect as we want the relationship to occur based on the Product ID column.
To get the correct relationship, select Product ID column in both the tables.
This will fix the relationship between the two tables. Based on the data in tables, Power BI suggest a Many to Many relationship.
If you feel this is incorrect, you can always change it.
Creating new Relationships
In the previous section, we have fixed an auto-detected relationship. In case, Power BI fails to auto-detect relationship between two tables, you can create a new relationship.
To create a new relationship, navigate to Data view, and from Table Tools tab in the ribbon, select Manage relationships.
In the Manage relationships screen, select New (as shown below)
Right now, we have loaded only two tables. But if you have more tables and you want to create relationships between them, you can do so using Manage relationships.