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.

New to Power BI? Get hands-on, step-by-step guidance in our Power BI for Beginners course. Start learning now.

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.

After loading multiple tables using Query Editor, you can create relationships between the tables and create Charts in Power BI


About the Author

Chandraish Sinha is the Founder and President of Ohio Computer Academy, a leading institution committed to delivering high-quality IT education. With a passion for teaching and a belief in his company’s mission—Inspire, Educate & Evolve—Chandraish brings over 25 years of experience in the Information Technology industry.

Chandraish has successfully implemented IT solutions across diverse domains including pharmaceuticals, healthcare, telecom, finance, and retail. He actively blogs on trending IT topics and training strategies:

👉 Check out his latest posts:

Explore more of his work on his Amazon Author Profile.

Connect with Chandraish on LinkedIn.

Leave a Comment

Thanks for adding your comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.