How to Connect to Multiple Data Sources in Power BI?


You have Power BI on your system, and you wonder, “Can I actually fetch data from more than one source?” Like maybe six different sources, or some Excel files, with an SQL database, or even pull in some live exchange rates from the web?

Let me answer that in short – yes, you totally can. And it’s literally one of the best things about Power BI – it’s built for connecting, blending, and visualizing data from multiple sources.

In this article, I’ll walk you through how to connect to multiple data sources in Power BI, using real-world examples. I’ll also share some important tips about combining data properly so your reports don’t fall apart later.

Understanding Data Sources in Power BI

Before jumping in, let’s just clarify what exactly counts as a ‘data source’?.

Well, in Power BI, a data source can be almost anything that holds data. It could be:

  • A file like Excel or CSV
  • A database (SQL Server, PostgreSQL, etc.)
  • A cloud platform (like Azure or SharePoint)
  • A live data feed or web API
  • Even another Power BI dataset

And yeah, you can connect to more than one of these at the same time in a single report. But you need to manage them well (especially when it comes to the relationships and refresh).

Types of Data Sources

To give you some perspective, here’s how the sources generally fall into categories:

Category Examples
Files Excel, CSV, XML, JSON, PDF
Databases SQL Server, MySQL, PostgreSQL
Cloud Services SharePoint, OneDrive, Azure
Web & APIs Websites with tables, REST APIs

Here’s all of them listed in Power BI.

Types of Data Sources in Power BI

Power BI really shines when it comes to connecting with all sorts of data sources. Whether your data lives in a simple Excel file, a solid SQL Server database, a cloud service, or even a live web API, Power BI can pull it all in seamlessly. This incredible flexibility means you can easily bring together information from literally anywhere, allowing you to build comprehensive dashboards and unlock insights that paint the full picture for your business.

How to Connect to Multiple Sources in Power BI

Now let’s get to the core part of the article: how exactly do you connect all these different sources in Power BI? Let me guide you through this, step by step.

  1. Open Power BI Desktop
  2. Click “Get Data” from the Home ribbon.
How to Connect to Multiple Data Sources in Power BI | Step 2
  1. Choose your first source, say, “Excel Workbook” and click on “Connect”.
How to Connect to Multiple Data Sources in Power BI | Step 3
  1. Navigate to the Excel file, and open it.
How to Connect to Multiple Data Sources in Power BI | Step 4
  1. Now, in the Navigator, select the files you need to import into Power BI and load the data you need. You can transform it in Power Query by clicking on “Transform Data”.
How to Connect to Multiple Data Sources in Power BI | Step 5
  1. Now your data will load into Power BI.
How to Connect to Multiple Data Sources in Power BI | Step 6
  1. Next, click on “Get Data” again. This time, maybe choose Web.
How to Connect to Multiple Data Sources in Power BI | Step 7
  1. Paste a URL with some public data (e.g., Results table on the UEFA European Football Championship Wikipedia page at: https://en.wikipedia.org/wiki/UEFA_European_Football_Championship)
How to Connect to Multiple Data Sources in Power BI | Step 8
  1. After the data loads in the Navigator, select the sheet or table you need and Load into Power BI. If required, you can also Transform the Data.
How to Connect to Multiple Data Sources in Power BI | Step 9
  1. Keep repeating as needed. Each source you connect to becomes a new table in your model.
How to Connect to Multiple Data Sources in Power BI | Step 10

Types of Connection Modes in Power BI

When you connect to data in Power BI, you’re given a choice between two major connection modes: Import (which we used previously) and DirectQuery. Each mode has its own strengths and trade-offs, and understanding them is crucial for building efficient, responsive dashboards.

1. Import Mode

This is the most commonly used and recommended connection mode for most scenarios. In this method, Power BI pulls the data from your source and stores it locally within the .pbix file. It works best when data doesn’t change frequently or when high performance and full modeling capabilities are required.

Advantages:

  • High performance: Since the data is loaded into Power BI’s in-memory engine, reports are fast and highly responsive.
  • Rich features: You can take full advantage of DAX, complex data transformations, calculated columns, and custom measures.
  • Offline access: Once imported, the data can be analyzed even without a live connection to the data source.

Disadvantages:

  • Data freshness: Since the data is static until refreshed, your report can become outdated unless you schedule regular refreshes.
  • File size limits: Very large datasets may increase the .pbix file size and lead to performance issues if not optimized.

2. DirectQuery Mode

In DirectQuery mode, Power BI does not store the data. Instead, it sends queries to the source every time you interact with the report. The data remains in the source system, and Power BI fetches only what’s needed, as and when required. It is the better choice in scenarios where real-time or near-real-time data is essential. Make sure that when you use it, the underlying data source can handle frequent query loads efficiently.

Advantages:

  • Real-time access: You always see the latest data, which is ideal for operational or monitoring dashboards.
  • No size limits: Since the data isn’t stored in the report file, there’s no concern about hitting memory or file size limits.

Disadvantages:

  • Slower performance: Every click or interaction sends a query to the source, which can lead to delays depending on the source’s speed and workload.
  • Limited functionality: Some Power BI features (like certain DAX functions, data transformations, and calculated tables) are restricted or unavailable.
  • Dependency on source availability: If your source goes down, your report breaks or loads slowly.

If you’re trying this out or writing a tutorial (like I’m doing here), it’s best to use data sources that are free and easy to access. Here are my favourite picks:

Source Why It’s Useful
Excel / CSV Easy to create mock data
Web Page / API Fetches live data like exchange rates or weather
OData Feed Microsoft provides public OData feeds (Northwind)
Local SQL Server Provides data in a database-style structure

With all of these free options available, you can skip sources like Salesforce or Azure, unless you’re already paying for those platforms.

Combining Data from Multiple Sources in Power BI

So now you’ve got all these sources in your report, but how do you make them work together?

This is where Power Query and the Model View come into play.

In Power Query, you can:

  • Transform each dataset, rename columns, filter rows, and change data types
  • Use Append if tables are similar (stack rows)
  • Use Merge if you want to join tables by a key (like a VLOOKUP)

In Model View, you can:

  • Define relationships between tables (e.g., Orders table links to Products table)
  • Always check for one-to-many or many-to-many issues
  • Don’t create circular references, Power BI doesn’t like those

Performance and Refresh Considerations

You need to be careful when mixing data sources, especially when some of them are from the cloud and some are local. Here are a few things to keep in mind:

  • Import mode = fastest way to get the data and supports all Power BI features.
  • DirectQuery = stays updated but slower, with limited transformations.
  • Some sources don’t refresh automatically, you’ll need a Gateway for them (especially for on-prem SQL).
  • Scheduled refresh might fail if credentials aren’t set up correctly.

Pro Tip: If possible, keep all your data in the same mode (either all Import or all DirectQuery) to avoid compatibility headaches.

Use Case Example

Let’s say you want to make a dashboard showing:

  • Monthly budget: from a CSV file
  • Actual sales: from a SQL Server table (on-premises)
  • Exchange rates: from a public API (like exchangerate-api.com)

Here’s how you can do it:

  1. Connect to Test/CSV
  1. Load the budget table. I’m using a sample table here, feel free to load your own dataset.
  1. Connect to SQL Server.
  1. Load sales by region data (or any other data of your choice). In the SQL Server database dialog box, enter the Server and Database (optional) names, and make sure the Data Connectivity mode is set to Import.
  1. Select OK, and on the next screen, verify your credentials, and then select Connect.
  2. Select the required tables and Load the data.
  3. Use Get Data > Web to pull exchange rates (https://app.exchangerate-api.com).
  1. In Power Query, transform and format all tables.
  1. Merge the exchange rate with sales to convert values.
  2. Create visuals (bar charts, KPIs, maps).

Boom, now you have a report that communicates with data from 3 very different sources.

Just remember:

  • Use Import mode unless you need live data.
  • Combine data carefully, clean it first, then relate or join as required.
  • Don’t go crazy mixing every source possible. Start small and grow as needed.
  • If you’re new, try with Excel + OData + Web API, all free and easy to use.

Important Note for SQL Server Data (On-Premises)

For your SQL Server data, since it’s an on-premises source, you’ll need to set up a Power BI On-premises Data Gateway. Think of this gateway as a secure bridge that allows Power BI (which operates in the cloud) to safely connect to your local SQL Server database.

Once the gateway is configured, you can schedule automatic data refreshes for your report. This means your dashboard will stay up-to-date with the latest sales figures without you having to manually refresh the data in Power BI Desktop. You can set the refresh frequency (e.g., daily, hourly) directly within the Power BI Service.

Without the gateway, Power BI wouldn’t be able to reach your local SQL Server, and you’d be stuck manually importing the sales data each time you wanted to update your report.

Conclusion

Connecting to multiple data sources in Power BI isn’t just possible – it’s one of the platform’s strongest capabilities. Power BI makes it super simple (and powerful) to pull data from local Excel files, cloud platforms, SQL databases, live APIs – you name it. It gives you the flexibility to blend all of this data into a single, unified, insightful report. However, the key to success lies in managing your data relationships, choosing the right connection modes, and planning for refresh needs. With a little practice, you’ll be building powerful, multi-source dashboards that tell the complete story, without breaking a sweat.

Login to continue reading and enjoy expert-curated content.

Leave a Reply

Your email address will not be published. Required fields are marked *