How to Connect Data in Power BI

Cody Schneider7 min read

Getting your data into Power BI is the first and most crucial step in building powerful dashboards that tell a story. This guide will walk you through exactly how to connect to the most common data sources you'll encounter. We'll cover everything from simple Excel files and web pages to databases and online services like Google Analytics.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Understanding Power BI's Data Connection Capabilities

Power BI is incredibly versatile, designed to pull information from hundreds of different places. Before we jump into the "how-to," it helps to understand the main categories of data sources it can handle. Think of these as different flavors of data you can bring into your reports.

The primary connection point for all of them is the Get Data button, which acts as a central hub. From there, you can connect to:

  • Files: The most common starting point for many users. This includes Excel workbooks (.xlsx, .xls), Comma Separated Values files (.csv), XML files, and entire folders of files. This is perfect for when you have data exports or locally stored trackers.
  • Databases: For more robust, centralized data storage. Power BI seamlessly connects to a huge range of databases like SQL Server, MySQL, PostgreSQL, Oracle, and many others. This allows you to pull live data directly from your company's systems.
  • Microsoft Power Platform: If your organization uses the Microsoft ecosystem, you can easily connect to Power BI Datasets, Dataflows, and Microsoft Dataverse.
  • Azure: Deep integration with Microsoft's cloud platform means you can connect directly to Azure SQL Database, Azure Synapse Analytics, blob storage, and more.
  • Online Services: This is a massive category that includes countless SaaS apps and platforms. You can pull data directly from Salesforce, Google Analytics, SharePoint, Dynamics 365, Mailchimp, and dozens of others without needing to download a single CSV.

The beauty of this is that you can mix and match. You can pull sales data from a SQL database, marketing spend from Google Analytics, and budget targets from an Excel file, then blend them all into a single, cohesive dashboard.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

How to Connect to Common Data Sources (Step-by-Step)

Let's get practical and walk through connecting to a few of the most frequently used data sources. All of these processes begin in the same place: the Home tab in the Power BI Desktop ribbon. Click the primary Get Data icon to see the most common sources, or click the dropdown arrow to open the full data source window.

1. Connecting to an Excel Workbook or CSV File

For most people, this is day one with Power BI. Maybe your accounting team emails you a sales report every week, or you have an export from a tool that doesn't have a direct connector. The process is simple and straightforward.

  1. Navigate to the Home tab and click Get Data.
  2. Select Excel workbook or Text/CSV from the common list. For this example, let's choose Excel.
  3. An operating system file browser window will open. Navigate to where your Excel file is saved, select it, and click Open.
  4. Power BI will analyze the file and open the Navigator window. This window shows you all the available tables and worksheets within that Excel file.
  5. Click on a table name or worksheet to see a preview of the data on the right. This helps you confirm you're grabbing the right information.
  6. Check the box next to each sheet or table you want to import. You can select multiple items from a single file.
  7. At the bottom right, you'll see two main options:

For now, click Transform Data. It's a great habit to get into, as almost all real-world data requires some minor adjustments.

2. Connecting to a SQL Server Database

Pulling data from a centralized database like SQL Server is how you build truly automated, reliable reports. Instead of depending on file exports, you connect directly to the source of truth.

Before you start, you'll need a few details from your IT department or database administrator: the server name and, potentially, the database name.

  1. In Power BI Desktop, click Get Data and select SQL Server.
  2. The SQL Server database connection window will appear. Here you need to provide a few pieces of information:
  3. Next, you face a critical choice: Data Connectivity mode.

For most use cases, starting with Import is the best choice.

  1. Click OK. Power BI will then connect to the server and open the Navigator window, similar to the Excel experience. You can browse through the available databases, schemas, and tables.
  2. Select the tables or views you need, see the preview, and click Transform Data to proceed to the Power Query Editor.
GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

3. Connecting to an Online Service (Google Analytics Example)

Eliminating the weekly drudgery of downloading CSV reports from marketing platforms is one of Power BI's biggest time-savers. Let's use Google Analytics as an example.

  1. Click Get Data and, if it's not in the common list, click More... This opens the full data source window.
  2. In the search bar, type "Google Analytics," select it, and click Connect.
  3. Power BI will display a notice about connecting to a third-party service. Click Continue.
  4. You'll be prompted to sign in with your Google account. This uses a secure process where you authorize Power BI to access your Google Analytics data.
  5. Once authenticated, click Connect.
  6. The Navigator will now display all the Google Analytics properties and views you have access to. Navigate and select the specific view you want to analyze.
  7. On the left side, you'll see a list of folders containing hundreds of dimensions (e.g., Source, Medium, Campaign, Country) and metrics (e.g., Sessions, Users, Bounce Rate). Tick the boxes for all the data points you want to pull into your report. You can select up to seven dimensions and ten metrics at once.
  8. Click Transform Data. Power BI will make an API call to Google Analytics and pull the requested data directly into your Power Query Editor, ready to be integrated with your other sources.

Your Next Step: Transforming Data in Power Query

As you've seen, nearly every data connection workflow ends by clicking Transform Data. This isn't just an optional step, it's the professional workflow that separates basic reports from great ones. This button takes you to the Power Query Editor, which is a powerful data preparation tool built inside Power BI.

Connecting to a data source is just about getting the raw material. Power Query is where you shape it into something usable. Here, you can perform hundreds of different transformations without writing any code, such as:

  • Removing unwanted columns: Your source might have dozens of columns, but you only need five.
  • Changing data types: Making sure numbers are treated as numbers, dates as dates, and text as text.
  • Filtering out rows: Removing irrelevant data, like test transactions or internal traffic.
  • Splitting columns: Turning a "Full Name" column into separate "First Name" and "Last Name" columns.
  • Merging or Appending queries: Combining data from multiple sources into a single, comprehensive table.

Spending a few minutes cleaning your data in Power Query at the start will save you hours of headaches and inaccurate calculations later on. Each step you take is recorded and repeatable, so when you refresh your data, the same cleaning logic is automatically applied.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Final Thoughts

Learning how to use Power BI's "Get Data" function is the gateway to unlocking your data's potential. By connecting directly to sources like Excel, SQL databases, and online services, you're building a reliable, automated foundation for all your future reports and dashboards.

Of course, the process of connecting data sources, shaping information in Power Query, and then modeling it perfectly can be a significant time investment, especially when dealing with the specific needs of marketing and sales analytics. This is where we wanted to create a more streamlined experience with Graphed. We connect directly to your marketing and sales platforms like Google Analytics, Shopify, and Salesforce with one-click integrations, eliminating manual setup. You can then use simple, natural language - like asking a colleague - to instantly build the dashboards you need, getting you from raw data to real insights in seconds, not hours.

Related Articles