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:
- Open Power BI Desktop.
- Click on Home > Get Data.
- Choose the data source (e.g., Excel, SQL Server).
- Navigate to the file or server and click Connect.
- Select the tables/sheets you want to load.
- 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:
- Click Get Data > Web.
- Enter the URL of the page (e.g., a Wikipedia table).
- 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
تعليقات
إرسال تعليق