Connecting to Data Sources in Power BI

Lesson 3: Connecting to Data Sources in Power BI

In this lesson, you will learn how to connect Power BI Desktop to different data sources such as Excel, CSV, databases, and web APIs.


🔗 Common Data Sources

Power BI supports a wide range of data sources. The most commonly used include:

  • Excel – Connect to .xlsx or .xls files.
  • CSV/Text – Flat files like .csv and .txt.
  • SQL Server – Connect to relational databases.
  • Web – Fetch data from REST APIs or online tables.
  • SharePoint – Import from lists or files stored on SharePoint sites.

📥 How to Connect to a Data Source

Follow these steps to connect:

  1. Open Power BI Desktop.
  2. Click on Home > Get Data.
  3. Choose the data source (e.g., Excel, SQL Server).
  4. Navigate to the file or server and click Connect.
  5. Select the tables/sheets you want to load.
  6. Click Load to import data, or Transform to clean it first.

⚡ Import vs. DirectQuery

When connecting to databases, you will be prompted to choose between:

  • Import – Loads data into Power BI. Faster performance, but data is static until refreshed.
  • DirectQuery – Queries the database live. Data is always up to date but performance may be slower.

Choose Import for better speed, and DirectQuery when you need real-time data.


🌐 Example: Connecting to a Web Data Source

To load data from a website:

  1. Click Get Data > Web.
  2. Enter the URL of the page (e.g., a Wikipedia table).
  3. Power BI will detect all available tables and let you preview and load them.

This is useful for real-time or open data sources online.


📝 Summary

Connecting to data sources is the first and most crucial step in Power BI. Whether you're pulling data from Excel, SQL, or the web, Power BI makes the process fast and flexible.


✅ Next Lesson

Lesson 4: Cleaning and Transforming Data Using Power Query

تعليقات

المشاركات الشائعة من هذه المدونة

Entity Framework - ما هو ORM؟ ونبذة عن Dapper وNHibernate

1.1 SQL Introduction

Entity Framework - مقدمة عن Entity Framework