Power BI Course
Getting Data from Files
The most common starting point for any Power BI project is loading data from a file — usually an Excel workbook or a CSV export — and knowing exactly how Power BI reads those files, what can go wrong, and how to fix it will save you hours of troubleshooting before you ever build a chart.
How Power BI Connects to Data
When you connect Power BI to any data source, it does not just open the file the way Excel does. It creates a query — a set of instructions that describes how to retrieve and shape the data. Every time you refresh the report, Power BI replays those instructions from scratch. This is a fundamentally different model from copy-pasting data.
This means where you save your source files matters from day one. Keep your Excel and CSV files in a stable, predictable location — not in your Downloads folder or on a Desktop that gets reorganised regularly.
The Get Data Dialog
Every data connection starts with the same entry point — Home → Get Data in the ribbon. This opens the Get Data dialog, which lists every connector Power BI supports. There are over 100 connectors. For file-based sources you only need to know four of them.
Connecting to an Excel File
Excel is the most common source for beginner Power BI work. The connection process involves three steps — selecting the file, choosing which sheets or tables to load, and deciding whether to load directly or transform first.
| OrderID | OrderDate | Region | Product | Revenue | Qty |
|---|---|---|---|---|---|
| 1001 | 2024-01-05 | North | Laptop | 1200 | 2 |
| 1002 | 2024-01-07 | South | Monitor | 350 | 1 |
| 1003 | 2024-01-09 | North | Keyboard | 85 | 5 |
| 1004 | 2024-01-12 | East | Laptop | 1200 | 1 |
| 1005 | 2024-01-14 | West | Monitor | 350 | 3 |
Sheets vs Named Tables — Which to Use
When Power BI reads an Excel file it finds both raw sheets and named tables. You should always prefer named tables over raw sheets when both are available. Here is exactly why.
| Behaviour | Raw Sheet | Named Excel Table |
|---|---|---|
| Row detection | Reads all rows in the used range — including blank rows between data blocks | Reads only the rows that belong to the table — clean boundary |
| Column headers | First row promoted to headers — only if no extra rows are above the data | Headers are always correct — defined as part of the table structure in Excel |
| New rows added | New rows below the original range may not be detected on refresh | New rows inside the table are always picked up on the next refresh |
| Extra junk | Totals rows, notes, and charts on the sheet get picked up as data rows | Only the defined table rows are included — nothing else on the sheet is read |
Teacher's Note: Before connecting any Excel file to Power BI, open it in Excel first and convert your data ranges to named tables. Select your data, press Ctrl + T, give the table a clear name like Sales_2024, and save. This one habit prevents at least 80% of the import problems beginners run into with Excel files.
Connecting to a CSV File
CSV files are simpler than Excel — they have no sheets, no named tables, no formatting. Power BI reads them as a flat table of rows and columns. The process is almost identical to Excel but with a few important differences to understand.
| OrderID | OrderDate | CustomerName | Product | Amount | Status |
|---|---|---|---|---|---|
| 2001 | 05/01/2024 | Alice Brown | Laptop | 1200 | Shipped |
| 2002 | 07/01/2024 | Bob Singh | Monitor | 350 | Delivered |
| 2003 | 09/01/2024 | Carol Diaz | Keyboard | 85 | Processing |
| 2004 | 12/01/2024 | Dan Patel | Laptop | 1200 | Shipped |
Common CSV Problems and How to Fix Them
CSV files exported from different systems come in slightly different formats. These are the most common issues and exactly how to resolve each one.
Using the Folder Connector to Combine Multiple Files
A very common real-world scenario: you receive a new CSV export from a system every month and need to combine them all into one table. The Folder connector lets Power BI automatically stack all files from a folder into one query — so each month when a new file arrives, you drop it in the folder and refresh.
| Name | Extension | Date Modified | Size (bytes) | Folder Path |
|---|---|---|---|---|
| orders_jan_2024 | .csv | 01/02/2024 | 14,220 | C:\Reports\Monthly\ |
| orders_feb_2024 | .csv | 01/03/2024 | 15,840 | C:\Reports\Monthly\ |
| orders_mar_2024 | .csv | 01/04/2024 | 13,980 | C:\Reports\Monthly\ |
| orders_apr_2024 | .csv | 01/05/2024 | 16,100 | C:\Reports\Monthly\ |
What Happens After You Load Data
Once you click Load (or Close and Apply from Power Query), Power BI imports the data into its in-memory engine. You will see a loading progress bar. When it finishes, your tables appear in the Data pane on the right side of the interface.
After loading, here is what you will see:
DATA PANE (right side)
▼ Sales_Table ← your table name from Excel
∑ Revenue ← numeric column (aggregatable)
∑ Quantity ← numeric column
📅 OrderDate ← detected as date type
🔤 Region ← text column
🔤 Product ← text column
🔑 OrderID ← whole number / key column
STATUS BAR (bottom of window)
Rows loaded: 1,240
Storage mode: Import
Last refresh: Today 14:22
If you loaded multiple tables, each appears as its own
section in the Data pane. Tables do NOT auto-relate to
each other — you define relationships manually in
Model View (covered in Lesson 11).
Refreshing Data and Changing the File Path
Once data is loaded, you will need to refresh it whenever the source file is updated. You will also occasionally need to update the file path if the source file has moved. Both operations are straightforward once you know where to look.
Teacher's Note: Never rename or move source files without updating the path in Power BI immediately. If you share a .pbix file with a colleague and they try to refresh it on their machine, the path C:\Users\YourName\Documents\sales.xlsx will not exist on their computer. For shared reports, store source files in a shared network drive or SharePoint folder and connect Power BI to that shared path from the very beginning.
Practice
Practice 1 of 3
When connecting to an Excel file, Power BI shows both raw sheets and named ___. You should always prefer the named version because it has cleaner row detection and reliable column headers.
Practice 2 of 3
If all CSV data appears in a single column after import, the most likely cause is that the wrong ___ setting was auto-detected in the CSV preview dialog.
Practice 3 of 3
To update a broken source file path after a file has moved, you go to Home → Transform Data → Data ___ Settings.
Lesson Quiz
Quiz 1 of 3
What is the key difference between clicking Load and Transform Data in the Navigator window when connecting to an Excel file?
Quiz 2 of 3
You receive a new monthly CSV export and need Power BI to include it automatically without creating a new connection each time. Which connector should you use?
Quiz 3 of 3
A colleague opens your .pbix file on their machine and the refresh fails immediately. The most likely reason is:
Next up — Lesson 7 takes you beyond files and shows you how to connect Power BI directly to databases — SQL Server, MySQL, and others — including what credentials mean, the difference between Import and DirectQuery mode, and how to write your first SQL query inside Power BI.