Locked lesson.
About this lesson
Using Power BI to import data from a text (or CSV) file
Exercise files
Download this lesson’s related exercise files.
2-01 Complete.pbix337.8 KB SalesTransactions.txt
4.5 MB
Quick reference
Getting data from a Text file
Using Power BI to import data from a text (or CSV) file
When to use
Use when you can’t connect directly to a database, but can download your source data to a text (or CSV) file
Instructions
The general process is:
- Go to Power BI Desktop
- Get Data > Text/CSV
- Locate the file and choose Edit when prompted
- Use Remove Rows > Remove Top Rows to remove any unnecessary rows from the top
- Click “Use First Row as Headers” to promote the first row to headers
- Right-click a column > Remove to remove unnecessary columns
- Click the icons at the top of a column to change data types
- Right-click a column > Remove Errors to remove all rows with errors
- Click the Filter arrow at the top of a column to filter out values and blank rows
- Rename columns by double-clicking them (or right-click and choose rename)
- Rename your table on the right side
- Click Close & Apply to complete the query
Hints & tips
- Select multiple columns by holding down the CTRL or SHFT key while clicking them
- To set data types on multiple columns, select them, right-click one and choose Change Type
- Always remove errors from a column before filtering!
- All steps are recorded on the right side so you can step through them
- Click the gear icon on any step to reconfigure it
- Click the X next to a step to remove it
Sorry, we don’t have a transcript for this lesson yet.
Lesson notes are only available for subscribers.