Section — 1
In this article, we will guide you through the steps of using the Power BI Desktop Query Editor.
Topics Covered:
1 — Power BI Query Editor
Power BI Query Editor
Power BI Query Editor is a powerful tool that can be used for data analysis and visualization. One of the key features of Power BI Desktop is the Query Editor. The Query Editor allows users to transform, clean and shape data before creating visualizations.
Here’s are some steps that help you to take a better drive of power query:
Step 1: “Connect to Data”
The first step is to connect to your data source. You can do this by clicking on “Get Data” present in the “Home” tab and located in the queries group of the ribbon.
This will open the “Get Data” dialog box. From here, you can select the data source that you want to connect to. In my case, I want to select “Excel workbook”
Once you have selected your data source, it will popped up a dialog box where you can select your data file and click “Open” located at bottom right corner of the dialog box.
Step 2: “Open Query Editor”
Once you have connected to your data source, you will see a preview of the data in the Power BI Desktop canvas.
To open the Query Editor, click on “Transform data” in the “Home” tab of the ribbon.
Step 3: “Transform Data”
The Query Editor will open and you will see a preview of your data. From here, you can transform your data in various ways. The most common transformations are filtering, sorting and grouping.
Filtering:
To filter data, click on the “Filter Rows” button in the “Transform” tab of the ribbon.
This will open a dialog box where you can select the column you want to filter and the filter criteria. once you are done, click “OK”.
Sorting:
To sort data, click on the “Sort Ascending” or “Sort Descending” button in the “Home” tab of the ribbon.
This will sort the data in ascending or descending order based on the selected column.
Grouping:
To group data, click on the “Group By” button in the “Transform” tab of the ribbon.
This will open a dialog box where you can select the columns you want to group by and the aggregation functions you want to apply. once you are done click “OK”.
Step 4: “Create Custom Columns”
You can also create custom columns in the Query Editor. To do this, click on the “Add Column” button in the add column tab of the ribbon.
This will open a menu where you can select the type of column you want to add. You can choose from various data types, such as text, numeric and date/time. once you are done with that, simply click on “OK” to close the dialog box.
Step 5: Combine Data
If you have multiple data sources that you want to combine, you can use the “Merge Queries” function in the “Combine” tab of the ribbon. This will allow you to join data from different tables or files.
Step 6: Load Data
Once you have transformed and cleaned your data, you can load it into the Power BI Desktop canvas by clicking on “Close & Apply” in the “Home” tab of the ribbon.
This will load your data into the canvas, where you can create visualizations and reports.
Conclusion:
The Query Editor is a powerful tool that allows you to transform, clean and shape your data before creating visualizations. By following the steps outlined in this article, you should be able to use the Query Editor effectively and efficiently.