Loading Data using Query Editor in Power BI

Home Loading Data using Query Editor in Power BI

Loading Data using Query Editor in Power BI

In Power BI, we can load data in different ways. Data can be loaded from Power BI desktop and also from the Query editor. In this article, we will learn to load data using Query Editor in Power BI.

In the earlier blog, Connecting to excel datasource in Power BI, we learnt how to connect to data from Power BI desktop. In this section, we will learn how to load the same XLS table using Query Editor.

Loading Data using Query Editor

  1. Launch Power BI desktop. A welcome screen will popup, and you can close the welcome screen.
  2. From the Home tab, select Transform data and then select Transform data from the drop down menu.
Navigate to Query Editor
Option to select Transform Data
  1. You will be navigated to the Query Editor. On Query editor, from the Home tab, select New Source and select Excel from the drop down menu. Browse and select your XLS data file.
Connecting to data Source in Query editor
New Source in Query editor
  1. You will see a Navigator window. Select your XLS sheet. It will display a preview of the data. Select OK from the bottom. Now you are connected to the data source.

Advantage of loading data using Query Editor

The advantage of loading data in Query Editor as compared to Power BI desktop/Get Data option is that you can transform the data as you load. Query editor provides you with more control.

It also provides options to change the column names, data types, combine/join tables using Joins etc.

  1. Navigate to View tab and select Advance Editor. 

Advanced editor generates code for each step taken within the Query Editor. 

Advanced Editor
Advanced Editor

Customized transformation or shaping code can be written in Advanced Editor.

  1. After you are done with all the changes to your data source in Query Editor, from the File tab, select Close & Apply

You will get navigated to Power BI desktop and you can see the loaded table in the Data view.

Query Editor should be a preferred way to connect and load data in Power BI as it provides data transformation options while loading the data.

Comment

Enrollment Form

Start your Journey by Enrolling in our Training Program

Learning Path By

Loading Data using Query Editor in Power BI

Enrollment Form

Start your Journey by Enrolling in our Training Program

Course Details

Program

Loading Data using Query Editor in Power BI

Training Format
(Online/In class)

In class

Preferred days / Timings (Weekdays/Weekends)

10 am - 12 pm
Weekend

Enrollment Form

Start your Journey by Enrolling in our Training Program