DEV Community

Habeeb Mobolaji Abi
Habeeb Mobolaji Abi

Posted on

Technical Blog Article

Getting Data from Different
Sources in Power BI

Data is everywhere, in spreadsheets, databases, cloud platforms, and web applications. For organizations to make informed decisions, they need a tool that can combine these different data sources into one unified analytical platform.
This is where Power BI becomes extremely powerful.
Power BI allows analysts to connect, import, transform, and visualize data from hundreds of sources. Whether your data is stored locally on your computer, in a database, or in cloud services like SharePoint and Google Analytics, Power BI can integrate them into a single dashboard.
In this article, we will explore how to get data from different sources in Power BI, including practical steps and real-world use cases.
Why Data Integration Matters
Businesses rarely store all their data in one place. For example:
Sales data may be stored in Excel
Customer data may exist in SQL Server
Marketing data may be in Google Analytics
Operational data may come from web APIs
Power BI helps combine these sources to create a unified view for reporting and decision-making.
Types of Data Sources Power BI Can Connect To
Power BI supports connections to over 100 data sources, grouped into major categories.

  1. File-Based Data Sources These include files stored locally or in shared folders. Common examples include: Excel Workbook (.xlsx) CSV files XML files JSON files PDF Text files Example: Connecting to Excel Steps: Open Power BI Desktop Click Home Select Get Data Choose Excel Workbook Browse and select your Excel file Choose the tables or sheets you want to import Click Load Power BI will automatically detect tables and import them for analysis. Use Case: Sales teams often track transactions in Excel. Power BI can easily convert these into interactive dashboards.
  2. Database Sources Power BI connects directly to relational databases. Examples include: SQL Server MySQL PostgreSQL Oracle IBM DB2 Azure SQL Database Example: Connecting to SQL Server Steps: Go to Get Data Select SQL Server Enter the Server Name Enter Database Name (optional) Choose either: Import Mode (loads data into Power BI) DirectQuery Mode (queries data directly from database) After authentication, Power BI loads the available tables. Use Case: Companies often store operational data in SQL Server. Connecting Power BI allows analysts to create real-time reporting dashboards.
  3. Online Services Power BI can connect directly to many cloud-based services. Examples include: SharePoint Online Microsoft Dynamics Salesforce Google Analytics Azure Data Lake Power Platform Dataverse Example: Connecting to SharePoint Steps:

✅ Click Get Data
✅ Select SharePoint Folder
✅ Enter the SharePoint site URL
✅ Sign in with Microsoft credentials
✅ Select files to import

This allows teams to analyze shared organizational data stored in the cloud.

  1. Web Data Sources Power BI can retrieve data from web pages and APIs. Examples include: Public datasets REST APIs Web tables JSON endpoints Example: Importing Data from a Web Page Steps:

Click Get Data
Select Web
Paste the URL
Power BI extracts tables from the page
Select the desired dataset
This is useful for scraping publicly available data.

  1. Power BI Dataflows and Datasets Organizations using Power BI Service can reuse existing datasets. Benefits include: Standardized data models Reduced data duplication Centralized data governance Steps:

✅ Select Get Data
✅ Choose Power BI datasets
✅ Connect to the published dataset
✅ Transforming Data with Power Query
After importing data, it often needs cleaning or transformation.
Power BI provides Power Query Editor, which allows users to:
Remove null values
Change data types
Split columns
Merge tables
Filter rows
Create calculated columns
Example transformation:
Converting date columns
Removing duplicate rows
Standardizing phone numbers
These transformations help ensure clean and reliable datasets.
Combining Data from Multiple Sources
One of Power BI’s strongest capabilities is data merging.
For example:
Source
Data
Excel
Sales transactions
SQL Server
Customer database
Web API
Exchange rates
Power BI can merge and relate these datasets using keys such as:
Customer ID
Product ID
Date

This enables advanced insights across different business functions.
Best Practices When Connecting Data
To ensure efficient reporting, analysts should follow these best practices:

  1. Clean Data Before Loading Remove unnecessary columns and rows.
  2. Use Import Mode for Better Performance Import mode stores data in Power BI for faster analysis.
  3. Schedule Refresh Keep dashboards updated automatically.
  4. Use Proper Relationships Ensure tables are connected using correct keys.
  5. Document Data Sources Maintain clear documentation for future maintenance. Real-World Example Imagine a company that wants to monitor sales performance. Their data sources include: Excel file → sales records SQL Server → customer database SharePoint → marketing campaign data By integrating these sources in Power BI, analysts can build dashboards that show: Sales by region Customer segmentation Campaign performance This unified view helps leadership make data-driven decisions quickly. Conclusion Power BI’s ability to connect to multiple data sources makes it one of the most powerful tools for modern data analytics. By integrating data from files, databases, cloud platforms, and web services, Power BI enables analysts to create comprehensive and actionable insights. Understanding how to connect and transform data is a fundamental skill for every data professional. With consistent practice, analysts can build dynamic dashboards that help organizations make smarter decisions.

Key Takeaways
✔ Power BI connects to 100+ data sources
✔ Supports files, databases, cloud services, and web data
✔ Power Query enables powerful data transformation
✔ Multiple sources can be merged for deeper insights
✔ Clean and structured data improves reporting accuracy

Top comments (0)