Sub topic 5
Loading a Sample Dataset with Get data
This chapter covers loading data into a new Power BI Desktop report. It assumes you have installed Power BI Desktop, launched it once, and are comfortable with spreadsheets or CSV files. You do not need to know Power Query or DAX yet.
What Get data does
Get data is the entry point for bringing external data into a report. Power BI Desktop uses a connector, a component that knows how to read one kind of source such as an Excel workbook, a text or CSV file, a SQL Server database, or a web page. After you choose a connector and a source, Power BI Desktop reads the source and shows you a preview. You then decide whether to load the data as is or to transform it first.
Loading adds each table to the report's data model. The data model is the set of tables, columns, relationships, and measures that every view reads from. Loading does not edit your source file. Power BI Desktop keeps its own copy of the data inside the report.
A sample dataset to practice with
Any small file works. To follow the chapter exactly, save the text below as Sales.csv in a folder you can find again, such as Documents\PowerBI-Practice.
OrderID,OrderDate,Region,Product,Quantity,SalesAmount
1001,2026-01-05,East,Notebook,10,45.50
1002,2026-01-07,West,Pen,25,31.25
1003,2026-01-09,East,Stapler,3,22.80
1004,2026-01-12,North,Notebook,8,36.40
1005,2026-01-15,West,Binder,6,27.90
1006,2026-01-18,South,Pen,40,50.00Note that the file is small and has a header row, one row per order, and one column per attribute. Power BI Desktop works best with this tidy layout.
Loading the file step by step
- On the start screen, select Get data. If the start screen is closed, use Home > Get data on the ribbon (the toolbar across the top of the window).
- The Get Data dialog lists connectors by category. Choose Text/CSV. You can also type "csv" in the search box. If you chose Excel workbook for an
.xlsxfile, the steps are the same except for the preview, described below. - In the file dialog, select
Sales.csvand choose Open. - Review the preview window.
- Choose Load.
When the load finishes, the Data pane on the right side of Report view lists a Sales table with its columns. The table is now part of the data model.
Reading the preview window
The preview is the place to catch problems before they reach the model. Look at four things.
- File Origin is the character encoding of the file. If accented letters look wrong, such as
éin place ofé, change this setting to65001: Unicode (UTF-8). - Delimiter is the character that separates columns. For a CSV it is normally a comma. If every value appears in a single column, the delimiter is wrong.
- Data Type Detection controls how Power BI Desktop guesses column types. The default is based on the first 200 rows. This setting matters when a file has more than 200 rows and a later row contains text in a column that looked numeric.
- Column names and values should match your file. If the first row of data was treated as data rather than headers, the file may need a transform step, which you will meet later.
The preview has three buttons.
| Button | What it does | When to use it |
|---|---|---|
| Load | Reads the data and adds it to the model right away | The data is clean and ready |
| Transform Data | Opens Power Query Editor with the data, before loading | Types are wrong, columns need removing, or values need cleaning |
| Cancel | Closes the dialog without loading | You picked the wrong file |
For this tutorial, Load is enough. A later chapter explains where Power Query Editor fits.
What happens during a load
Power BI Desktop does more than copy the file. It follows a sequence that is useful to know when a load fails or is slow.
The connector reads the file and the preview shows a sample. If you choose Load, the data goes to the model. If you choose Transform Data, it passes through Power Query Editor first, and the results reach the model when you select Close & Apply.
Behind the scenes, even a direct Load creates a query, which is a saved list of steps that fetches and shapes the data. Those steps are re-run every time you refresh the report. This is why moving or renaming the source file later breaks the refresh.
Import mode and DirectQuery
For files, Power BI Desktop always uses Import mode. Import mode copies the data into the report, so the report works without the source and responds quickly. The cost is that the data is a snapshot. To see changes in the source file, you must select Refresh on the Home tab.
Some database connectors offer a second option, DirectQuery. In that mode the report sends queries to the source each time a visual changes, and it stores no copy of the data. It suits very large or constantly changing sources, but it is slower and supports fewer features. You cannot use it with a CSV file. This tutorial uses Import mode throughout.
Loading more than one table
A real report usually has several tables, for example sales, products, and regions. Choose Get data again to add another source. Each new table appears in the Data pane next to the existing ones. If you pick an Excel workbook that has several sheets, the preview shows a Navigator with a checkbox for each sheet. You can tick several and load them in one step.
Loading two tables does not by itself connect them. Power BI Desktop may detect relationships automatically when column names and types match. You can check and change these in Model view, which is covered later in this tutorial.
Common errors and how to fix them
- The file is locked or cannot be opened. Another program, often Excel, may have the file open. Close it and try again.
- All values appear in one column. Check the Delimiter setting. Files from some regions use a semicolon, not a comma.
- A numeric column loads as text. A stray value such as
N/Aor a currency symbol can cause this. Choose Transform Data and fix the type or the value. - Dates load as text or in the wrong order. Day-month and month-day formats are ambiguous. Set the type in Power Query Editor and, if needed, use a locale-aware conversion.
- Refresh fails later. The file path is stored in the query. If you moved the file, update the path through Transform data > Data source settings.
Verifying the load
After loading Sales.csv, check three things.
- The Data pane shows a
Salestable with six fields. - Numeric fields such as
QuantityandSalesAmountshow a sigma (Σ) icon, which means Power BI Desktop treats them as numbers that can be summed. - The Home tab shows the file under Recent sources, so you can reload it quickly.
If any of these is missing, open Power Query Editor with Transform data and look at the Applied Steps list on the right to see which step produced the problem.
Exercise
You load a CSV file and every row appears as one long text value in a single column. Which preview setting should you check first, and which button lets you fix the problem without loading bad data?
Show answer
Check the Delimiter setting, because the comma or semicolon separating the columns was not recognized. If changing it does not help, choose Transform Data to open Power Query Editor and fix the problem before the data reaches the model.
Exercise
A colleague sends you a report that was built from a CSV on their laptop. You open it, and Refresh fails. What is the most likely cause, and where do you fix it?
Show answer
The query stores the original file path, which does not exist on your computer. Update the path under Transform data > Data source settings, or place the file at the same path.
Exercise
Why can you not choose DirectQuery when loading Sales.csv, and what does Import mode mean for how current the data is?
Show answer
File connectors support only Import mode. Import copies the data into the report, so it is a snapshot that stays unchanged until you select Refresh.