Power BI is one of the most popular tools for turning raw data into interactive reports and dashboards. However, before you can create charts, build dashboards, or write DAX measures, there is one fundamental step you need to understand:
Connecting Power BI to a data source.
For beginners, this step may look simple—and technically it is—but understanding how Power BI connects to, imports, transforms, and refreshes data will make a significant difference as your reports become more complex.
In this tutorial, we will walk through the process of connecting Power BI Desktop to your first data source, using an Excel file as an example.
What Is a Data Source in Power BI?
A data source is the location where your data is stored.
Power BI can connect to many different types of data sources, including:
- Microsoft Excel
- CSV files
- SQL Server
- MySQL
- PostgreSQL
- Oracle
- SharePoint
- Microsoft Dataverse
- Azure services
- Web APIs
- Power BI semantic models
- Other cloud and enterprise data platforms
For a beginner, Excel or CSV is usually the easiest place to start because you can immediately see how the data is structured.
For example, imagine you have an Excel file containing sales data:
| Date | Product | Category | Sales | Region |
|---|---|---|---|---|
| 2026-01-05 | Laptop | Electronics | 12500000 | Jakarta |
| 2026-01-07 | Monitor | Electronics | 4500000 | Bandung |
| 2026-01-10 | Keyboard | Accessories | 850000 | Surabaya |
| 2026-01-12 | Mouse | Accessories | 500000 | Jakarta |
This Excel file becomes the data source for your Power BI report.
Power BI Desktop vs Power BI Service
Before connecting to data, it is important to understand the difference between Power BI Desktop and Power BI Service.
Power BI Desktop
Power BI Desktop is primarily used for:
- Connecting to data
- Transforming data
- Creating data models
- Creating DAX calculations
- Designing reports
- Testing visualizations
This is where you will usually perform most of your development work.
Power BI Service
Power BI Service is the cloud-based platform used for:
- Publishing reports
- Sharing dashboards and reports
- Creating workspaces
- Managing semantic models
- Configuring scheduled refresh
- Managing permissions
- Collaboration
A typical workflow looks like this:
Data Source → Power BI Desktop → Transform → Model → Report → Publish → Power BI Service
Understanding this workflow early will help you avoid confusion later.
Step 1 — Open Power BI Desktop
Start by opening Power BI Desktop.
When Power BI Desktop opens, you will see the main report canvas along with the navigation and visualization areas.
To connect to your first data source, select:
Home → Get Data
Depending on your Power BI version, you may also see commonly used connectors directly on the Home ribbon.
Select:
Get Data → Excel workbook
Step 2 — Select Your Excel File
Power BI will open a file selection window.
Navigate to the location where your Excel file is stored.
For this tutorial, let's assume the file is:
SalesData.xlsx
Select the file and click:
Open
Power BI will analyze the workbook and display the available sheets and tables.
Step 3 — Choose the Data You Want to Import
After selecting the Excel file, Power BI displays the Navigator window.
The Navigator allows you to preview the objects available inside your workbook.
For example, you may see:
- Sales
- Customers
- Products
- Employees
Select the table or worksheet you want to use.
For our example, select:
Sales
You will see a preview of the data.
At this stage, Power BI gives you two main options:
Load
Click Load if your data is already clean and ready to use.
Power BI will import the data directly into the model.
Transform Data
Click Transform Data if you need to clean or modify the data before loading it.
For real-world projects, Transform Data is often the better choice because business data frequently contains inconsistencies.
Step 4 — Understanding Power Query
When you click Transform Data, Power BI opens Power Query Editor.
Power Query is the data preparation layer of Power BI.
It allows you to perform tasks such as:
- Removing unnecessary columns
- Renaming columns
- Changing data types
- Removing duplicate records
- Filtering rows
- Splitting columns
- Merging tables
- Appending datasets
- Replacing values
- Creating calculated columns
- Handling missing values
For example, suppose the Sales column was imported as text instead of a number.
You can select the column and change its data type to:
Decimal Number
Similarly, if your Date column is recognized as text, change it to:
Date
Correct data types are extremely important for Power BI because they affect calculations, relationships, sorting, filtering, and visualizations.
Step 5 — Check Your Column Data Types
One of the first things you should verify after connecting to a data source is the data type of every important column.
A typical sales dataset might look like this:
| Column | Recommended Data Type |
|---|---|
| Date | Date |
| Product | Text |
| Category | Text |
| Sales | Decimal Number |
| Quantity | Whole Number |
| Region | Text |
Using the correct data types prevents many problems later.
For example, if Sales is stored as text, Power BI may not be able to properly calculate:
- Total Sales
- Average Sales
- Minimum Sales
- Maximum Sales
- Year-over-Year Growth
Step 6 — Apply Your Transformation
Once your data has been cleaned, select:
Home → Close & Apply
Power BI will apply the Power Query transformations and load the resulting dataset into the Power BI data model.
Depending on the amount of data and the complexity of your transformations, this process may take anywhere from a few seconds to several minutes.
Step 7 — Explore Your Data Model
After the data is loaded, Power BI Desktop provides several views.
The most important ones are:
Report View
Used to create charts, tables, cards, slicers, and other visualizations.
Data View
Used to inspect the data that has been loaded into the model.
Model View
Used to create and manage relationships between tables.
For a simple one-table report, you may not need to create relationships yet.
However, real-world Power BI projects usually involve multiple tables.
For example:
Sales
Customers
Products
Calendar
These tables can be connected using relationships.
Step 8 — Create Your First Visualization
Now that your data is connected, let's create a simple visualization.
Go back to:
Report View
From the Visualizations pane, select a Column Chart.
Drag:
Category
into the X-axis.
Then drag:
Sales
into the Y-axis.
Power BI will automatically aggregate the Sales values.
You should now have a chart showing sales by category.
For example:
- Electronics
- Accessories
- Furniture
- Software
This is your first Power BI visualization.
Step 9 — Create a Simple KPI Card
Charts are useful, but business users often need a quick summary.
Let's create a total sales KPI.
Insert a Card visual.
Drag:
Sales
into the Card.
Power BI will automatically calculate the total.
For example:
Total Sales
Rp 18.35B
This simple card can become part of an executive dashboard.
Understanding Import Mode
When connecting to data, Power BI can use different storage modes.
The most common one for beginners is:
Import
With Import mode, Power BI loads the data into its internal model.
The basic flow is:
Source → Power BI → Data Model
The main advantage is performance. Because the data is loaded into the Power BI model, reports can generally interact with the data quickly.
However, the data does not automatically change every time the source changes.
You need to refresh the dataset.
What Happens When You Refresh?
Suppose your Excel file originally contains:
10,000 rows
Then tomorrow your source file contains:
12,000 rows
When you refresh the Power BI model, Power BI retrieves the latest data according to the connection and query configuration.
In Power BI Desktop, you can select:
Home → Refresh
Power BI will execute the queries again and update the model.
This is one of the most important concepts to understand:
Connecting to data is not the same thing as keeping the data automatically updated.
Understanding Power Query and DAX
Beginners sometimes confuse Power Query with DAX.
They serve different purposes.
Power Query
Power Query is primarily used for:
Preparing data
Examples:
- Remove duplicates
- Rename columns
- Change data types
- Filter rows
- Merge tables
- Append tables
- Clean text
DAX
DAX is primarily used for:
Calculating and analyzing data in the model
For example:
Total Sales =
SUM(Sales[Sales])Another example:
Total Quantity =
SUM(Sales[Quantity])A simple way to remember the difference is:
Power Query = Prepare
DAX = Calculate
This distinction becomes increasingly important as your Power BI projects grow.
Common Data Sources You Can Connect to
Excel is only the beginning.
Power BI supports a wide variety of data sources.
1. CSV
CSV files are commonly used for:
- Exported application data
- System reports
- Transaction data
- Logs
Power BI can import CSV files directly.
2. SQL Server
SQL Server is commonly used in enterprise environments.
A typical architecture might look like:
Application → SQL Server → Power BI
Power BI can connect to SQL Server and retrieve data from:
- Tables
- Views
- Stored procedures, depending on the connector and scenario
3. MySQL
MySQL is frequently used by:
- Web applications
- WordPress systems
- Business applications
- SaaS platforms
Power BI can connect to MySQL and use the database as a reporting source.
4. PostgreSQL
PostgreSQL is another popular relational database supported by Power BI.
A typical architecture might look like:
Application → PostgreSQL → Power BI
This can be particularly useful when your operational system is built using technologies such as .NET, Node.js, Python, or other application frameworks.
5. Web APIs
Power BI can also retrieve data from web-based sources.
For example:
Application → REST API → Power BI
This can be useful when the data isn't stored directly in a traditional database that Power BI can access.
However, API authentication, pagination, rate limits, and refresh configuration need to be considered carefully.
Import vs DirectQuery
As you move beyond beginner-level Power BI, you will encounter another important concept:
Import vs DirectQuery
Import
Data is loaded into the Power BI model.
Advantages:
- Generally fast report interaction
- Strong modeling capabilities
- Good for many analytical scenarios
Considerations:
- Data needs to be refreshed
- Model size needs to be managed
DirectQuery
Power BI sends queries to the underlying data source when users interact with the report.
Advantages:
- Data can remain in the source system
- Useful for certain large or frequently changing datasets
Considerations:
- Performance depends heavily on the source system
- Modeling and transformation capabilities can differ from Import scenarios
- Poorly designed source queries can affect report performance
The right choice depends on your architecture, data volume, freshness requirements, and reporting needs.
Common Problems When Connecting Power BI to Data
Connecting Power BI to a source is usually straightforward, but beginners commonly encounter several issues.
Problem 1 — Incorrect Data Type
Example:
Sales = "1000000"
instead of:
Sales = 1000000
The first value is text while the second is numeric.
Solution: Check and correct the column data type in Power Query.
Problem 2 — Blank or Null Values
Some datasets contain missing values.
For example:
| Product | Region | Sales |
|---|---|---|
| Laptop | Jakarta | 12500000 |
| Monitor | 4500000 | |
| Keyboard | Bandung |
Before deciding how to handle blanks, understand why the values are missing.
Possible approaches include:
- Replace with a specific value
- Leave as blank
- Remove the row
- Fix the source data
Do not automatically replace every blank with zero without understanding its meaning.
Problem 3 — Duplicate Records
Duplicate rows can cause incorrect totals.
For example, if one transaction appears twice, your total sales may be overstated.
Always understand the grain of your dataset before removing duplicates.
Problem 4 — Changing Excel File Locations
A common beginner problem is moving an Excel file to another folder.
Power BI may then report that the source file cannot be found.
For example:
Original:
C:\Reports\SalesData.xlsx
Moved to:
D:\PowerBI\SalesData.xlsx
The Power Query connection may still point to the original location.
Solution: Update the source path in Power Query.
Problem 5 — Column Names Change
Suppose your source originally contains:
Sales Amount
but someone changes it to:
Total Sales
Your Power Query steps or DAX calculations may be affected.
This is why stable source schemas are important in production reporting environments.
Best Practices for Your First Power BI Data Source
Even though you are starting with a simple dataset, it is worth developing good habits from the beginning.
1. Keep Your Source Data Clean
Avoid unnecessary formatting and manually merged cells in data tables.
A structured table is much easier for Power BI to process.
2. Use Meaningful Column Names
Instead of:
Col1
use:
Transaction Date
Instead of:
Amt
use:
Sales Amount
3. Use Consistent Data Types
Dates should be dates.
Numbers should be numbers.
Text should be text.
This sounds simple, but it prevents many problems later.
4. Avoid Unnecessary Transformations
Every Power Query transformation adds complexity.
Only perform transformations that are actually required.
5. Document Important Queries
As your Power BI project grows, documenting the purpose of queries and transformations can save significant time.
6. Think About Data Refresh Early
Ask:
- Where is the source data stored?
- How often does it change?
- How often should the report refresh?
- Will the report eventually be published to Power BI Service?
- Does the source require a gateway?
These questions become increasingly important in production environments.


What Should You Learn Next?
Once you successfully connect your first data source, the next learning path should be:
1. Power Query
Learn how to clean and transform data.
2. Data Modeling
Understand relationships, dimensions, facts, and star schema.
3. DAX
Learn how to create measures and calculations.
4. Visualizations
Learn how to communicate insights effectively.
5. Filters and Slicers
Learn how users can interact with your reports.
6. Power BI Service
Learn how to publish, share, refresh, and manage reports.
7. Row-Level Security
Learn how to control what different users can see.
Final Thoughts
Connecting Power BI to your first data source may seem like a small step, but it is the foundation of everything that comes afterward.
The key is not simply knowing where the Get Data button is.
You should understand the complete journey:
Source → Transform → Model → Calculate → Visualize → Refresh → Share
Once you understand this workflow, moving from an Excel file to SQL Server, PostgreSQL, APIs, cloud platforms, and enterprise data warehouses becomes much easier.
Your first Power BI report doesn't need to be complicated.
Start with one clean dataset, understand how Power BI reads it, transform it when necessary, create a few meaningful visualizations, and gradually build your knowledge of data modeling and DAX.
That foundation will serve you well as you move toward more advanced Power BI solutions.
Frequently Asked Questions
Can I use Excel as my first Power BI data source?
Yes. Excel is one of the easiest sources for beginners because the data structure is easy to inspect and understand.
Do I need SQL to learn Power BI?
No. You can start learning Power BI without SQL. However, SQL becomes very useful when working with databases and enterprise data sources.
What is the difference between Power Query and DAX?
Power Query is primarily used to prepare and transform data, while DAX is primarily used to create calculations and analytical logic in the Power BI model.
Does Power BI automatically update my data?
Not necessarily. The behavior depends on the connection type and deployment configuration. In many scenarios, you need to configure refresh.
Should I use Import or DirectQuery?
It depends on your data architecture, data volume, freshness requirements, source-system capabilities, and reporting needs. Import is often a straightforward starting point, while DirectQuery is useful for specific scenarios where querying the source directly is appropriate.


