How to Add a Data Source in Power BI
- Sophie Ricci
- Views : 28,543
Table of Contents
You built a Power BI report. It looks great. But the data inside it is wrong, stale, or simply not connected to the right place.
That’s the most common Power BI frustration — and it always comes back to one thing: the data source.
Get this right and your dashboards run themselves. Get it wrong and you’re manually updating spreadsheets at midnight before a board meeting.
This guide walks you through exactly how to add a data source in Power BI — whether you’re pulling from Excel, a SQL database, a live web API, or a cloud tool like Salesforce. Every step is laid out clearly, including the parts most tutorials skip.
What Is a Data Source in Power BI?
Before you add one, it helps to understand what Power BI actually treats as a “data source.”
A data source is any system or file that Power BI can pull data from. That includes:
- Files — Excel workbooks, CSV files, XML, JSON
- Databases — SQL Server, MySQL, PostgreSQL, Oracle
- Cloud services — Azure, Google Analytics, Salesforce, SharePoint Online
- Web sources — Public URLs, REST APIs, OData feeds
- Real-time feeds — Streaming datasets, Azure Event Hubs
According to Microsoft, Power BI supports over 150 native data connectors out of the box — and that number grows with every major update. As of 2024, Power BI has more than 250,000 organizations using it globally, and a core reason for that adoption is how broadly it connects to existing data infrastructure.
Every report you build depends on at least one of these sources. When you add a data source correctly, your reports stay live, accurate, and automated. When you don’t, you’re refreshing things by hand.
The Two Ways to Add a Data Source
There are two primary paths depending on where you’re working.
Power BI Desktop — the installed application for building reports. This is where most data connections start.
Power BI Service — the browser-based platform at app.powerbi.com. Here you manage data source credentials, set up scheduled refresh, and connect published reports to live data.
You’ll often need to configure the source in both places for full functionality. Start in Desktop. Publish. Then configure credentials in the Service.
How to Add a Data Source in Power BI Desktop
Open the Get Data Menu
Launch Power BI Desktop. On the Home ribbon, click Get Data.
A dialog box opens with a search bar and a full list of connectors organized by category:
- All
- File
- Database
- Power Platform
- Azure
- Online Services
- Other
You can either browse the categories or type the name of your source directly into the search bar.
Choose Your Data Source Type
Click the source you want to connect to. The most commonly used ones are:
- Excel Workbook — for .xlsx or .xls files
- Text/CSV — for comma or tab-separated data
- SQL Server — for Microsoft SQL databases
- Web — for live URLs and REST APIs
- SharePoint Online List — for Office 365 users
- Blank Query — for building custom M-language queries from scratch
Click Connect once you’ve selected your source.
Enter Connection Details
Each source type asks for different information. Here’s what to expect:
For Excel or CSV:
You’ll get a file picker. Navigate to your file, select it, and Power BI will open the Navigator panel where you choose which sheets or tables to import.
For SQL Server:
Enter the server name and, optionally, the database name. Choose between Import (loads a snapshot) or DirectQuery (queries live from the database each time). Use DirectQuery when the dataset is too large to import or when you need real-time accuracy.
For Web:
Paste the URL. If it’s a structured page or API, Power BI’s web connector will parse the data into a table automatically.
For Cloud Services (Salesforce, Google Analytics, etc.):
You’ll be redirected to OAuth authentication or asked to enter API credentials.
Load or Transform the Data
Once connected, you have two choices in the Navigator panel:
- Load — Imports the data directly into your report
- Transform Data — Opens Power Query Editor so you can clean, filter, reshape, and combine before loading
Almost always, go with Transform Data first. Power Query is where you:
- Remove duplicate rows
- Change data types
- Filter out irrelevant records
- Merge multiple tables
- Rename columns to readable names
According to a 2023 Gartner report, poor data quality costs organizations an average of $12.9 million per year. A few minutes in Power Query prevents a lot of that.
When you’re happy with the data shape, click Close & Apply in Power Query. Power BI loads the data into the model.
How to Add a Data Source in Power BI Service
If you’ve published a report from Desktop and want it to refresh automatically in the browser, you need to configure the data source credentials in the Power BI Service.
Navigate to Dataset Settings
Go to app.powerbi.com. In the workspace where you published your report, find the dataset associated with it.
Click the three-dot menu next to the dataset and select Settings.
Configure Data Source Credentials
Under Data source credentials, you’ll see a list of all sources connected to that dataset.
Click Edit credentials next to each source and enter the authentication details. Depending on the source type, this will be:
- Username and password
- OAuth (for Microsoft 365, Google, Salesforce, etc.)
- API key
- Anonymous (for public URLs)
Power BI stores these credentials securely. You configure them once per workspace, not per report.
Set a Scheduled Refresh
Under Scheduled refresh, toggle it on and choose how often Power BI should pull fresh data from your source. Options range from every 30 minutes to once a day.
A few important limits to know:
- Power BI Pro allows up to 8 refreshes per day per dataset
- Power BI Premium allows up to 48 refreshes per day (every 30 minutes)
- DirectQuery and Live Connection datasets don’t require scheduled refresh since they query the source in real time
As of 2024, Microsoft reports that over 30 million people use Power BI monthly — and the majority rely on scheduled refresh to keep dashboards current without manual intervention.
Adding Multiple Data Sources to One Report
One of Power BI’s most powerful features is the ability to blend data from different sources inside a single report.
For example, you could connect your CRM data from Salesforce, your ad spend data from Google Analytics, and your financial data from an Excel file — then merge them into one unified view across your entire funnel.
To do this in Power Query:
- Add each source separately via Get Data
- Use Merge Queries to join tables on a common key (like email address, date, or product ID)
- Use Append Queries to stack similar datasets vertically (like combining monthly sales files into one year-long table)
A 2022 Forrester study found that organizations using integrated data views (pulling from 3+ sources into unified dashboards) reported 23% faster decision-making compared to those using siloed reports.
Using the On-Premises Data Gateway
If your data lives inside a corporate network — like an internal SQL Server, Oracle database, or SharePoint on-premises — you need the On-Premises Data Gateway to connect it to the Power BI Service.
The gateway acts as a bridge between your internal network and Microsoft’s cloud. Once installed on a local machine:
- It runs as a Windows service in the background
- Power BI Service sends refresh requests through it
- The gateway queries your on-prem data source and returns results to the cloud
To set it up:
- Download the gateway from Microsoft’s official site
- Install it on a machine that has access to your data source and stays powered on
- Sign in with your Power BI account
- In Power BI Service, go to Settings → Manage Gateways and register the data source under the gateway
The gateway supports SQL Server, Oracle, MySQL, PostgreSQL, Analysis Services, SharePoint, and more. According to Microsoft documentation, the gateway handles hundreds of millions of refresh operations per month across enterprise customers globally.
Common Data Source Errors and How to Fix Them
“Unable to Connect” on a Database
This usually means either the server name is wrong, a firewall is blocking the port, or credentials have expired. Double-check the server address, confirm port 1433 is open for SQL Server, and re-enter credentials in dataset settings.
“Data Source Not Found” After Publishing
This happens when Power BI Service can’t match the data source credentials configured in Desktop. Go to dataset settings in the Service and re-enter your credentials manually.
Refresh Fails Silently
Check your gateway status first if you’re using one. Then verify that the refresh schedule is within your plan’s daily limit. Exceeding the limit silently skips the refresh without an error notification.
Excel File Refresh Broken After Moving the File
Power BI stores the file path. If the Excel file moves or is renamed, the connection breaks. In Power Query, update the source path under Data Source Settings → Change Source.
DirectQuery Reports Running Slow
DirectQuery sends a new query to your source every time a filter or visual changes. If the source database isn’t optimized for this load, performance degrades. Add indexes to frequently filtered columns or consider switching large tables to Import mode where possible.
Best Practices When Adding Data Sources in Power BI
Use Import mode for speed, DirectQuery for freshness. Most reports don’t need real-time data. Import mode is significantly faster and more responsive. Use DirectQuery only when data must be live or the volume is too large to import.
Name your queries clearly. When you connect a source in Power Query, rename it to something descriptive immediately. “Table 1” becomes a nightmare six months later.
Document your data sources. Especially in shared workspaces. Leave notes in Power Query steps or in a separate “Documentation” page in your report explaining what each source is and where it comes from.
Test credentials before publishing. Nothing is worse than publishing a report, setting up a scheduled refresh, and discovering at 6 AM that credentials were wrong and no data loaded overnight.
Use parameters for file paths and server names. If you’re building reports that others will reuse, parameterize the connection details so they don’t have to dig into Power Query to change a single string.
Research from BARC’s 2023 BI survey found that organizations with documented, standardized data source practices had 31% fewer report errors and spent 40% less time on report maintenance compared to teams without those standards.
Power BI Data Source Types: Quick Reference
Source Type | Best For | Refresh Mode |
Excel / CSV | Small datasets, manual uploads | Import |
SQL Server | Enterprise databases | Import or DirectQuery |
SharePoint Online | Team documents, lists | Import |
Salesforce | CRM data | Import |
Google Analytics | Web traffic data | Import |
Azure SQL | Cloud databases | Import or DirectQuery |
Web / REST API | Live external data | Import or DirectQuery |
Streaming Dataset | Real-time dashboards | Push / Streaming |
Conclusion
Adding a data source in Power BI is the foundation of every report you’ll ever build. Get it right once — set up the connection, configure credentials, enable scheduled refresh — and your dashboards stay accurate without manual work.
The process is the same whether you’re connecting a single Excel file or a live enterprise SQL database:
- Use Get Data in Power BI Desktop to make the connection
- Use Power Query to clean and shape data before loading
- Configure credentials in Power BI Service to enable scheduled refresh
- Add the On-Premises Data Gateway for private network sources
Power BI’s 150+ connectors mean almost any data system you’re already using can feed directly into your reports. The goal is automation — data that updates itself so you can focus on reading the insights, not managing the pipeline.
If that idea of automated, systematic pipelines appeals to you beyond just reporting — and you want the same approach applied to generating new business — SalesSo builds complete outbound lead generation systems across cold email, LinkedIn, and cold calling. We handle the targeting, campaign design, and scaling so your pipeline fills itself the same way a well-built Power BI dashboard runs.
🚀 Ready to Scale Your Outreach?
Your profile photo is just the start. We design complete LinkedIn prospecting campaigns that fill your calendar with qualified meetings—using proven systems that work.
7-day Free Trial |No Credit Card Needed.
FAQs
Does a professional LinkedIn photo really make a difference?
What's the best size for a LinkedIn profile photo?
Should I smile in my LinkedIn photo?
Can I use an AI-generated headshot for LinkedIn?
How does a better LinkedIn photo help with outreach and lead generation?
We deliver 100–400+ qualified appointments in a year through tailored omnichannel strategies
- blog
- Sales Development
- How to Add a Data Source in Power BI