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.


About the Author

Chandraish Sinha has  20+ years of experience in Information Technology. He is an accomplished author and has published 11 books covering Business Intelligence related topics such as, Tableau,Power BI, and Qlik. Checkout his Amazon Author profile.

His latest book Excel Basics to Advanced covers all the aspects of MS Excel and provides exercises for self-learning.

Similarly, his recent book, Dashboarding with Tableau, covers all the features in Tableau and includes exercises for self-learning.

He has implemented IT solutions in different domains viz. Pharmaceutical, Healthcare, Telecom, Financial and Retail.

He blogs regularly on various IT topics. Check them out in the links given below: 

Blogs

Learn Tableau

Learn All Bi

Leave a Comment

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