NEW! FREE 30 Minutes MS Excel - Working with Dates Course  Watch now 

Power BITutorials

How to Edit A Query Using Power Query

1 Mins read

Power Query also allows you to edit a query that you have already generated. Let’s take an example. Suppose you have a data table as shown below.

Editing A Query By Power Query

This is an employee data and you have to create the post for each employee based on their experience given in the data table.

Step 1: Select the ‘Experience’ column

To apply the conditions on your data table, you need to apply a conditional column. Select the ‘Experience’ column for applying conditions as shown in the picture below.


Step 2: Check your data after applying Conditional Column

After you apply the conditions, check the resulting data table once. Here, we have given the conditions as a junior, senior and rising senior as shown in below picture.



Step 3: Refresh Data after updating Data Table

Since this is employee data, it may keep changing. What if an employee has zero experience joins the organization? In such a case, you have to first update the data table and then refresh it in Power Query. As shown below, it gives the wrong post for the newly added employee. To do this correction, we do not need to make the Post column from scratch. We can just edit the query and make only the required changes manually.

After Refreshing Data

Step 4: Editing the Query

To edit the query, click on the Formula bar on the top of the data table.

Add the condition for value 0 as ‘Trainee’ as shown below and press enter.


This will give you the correct result as shown in the below picture. This is how you can edit the query in Power Query Editor. DATA TABLE AFTER EDITING QUERY

You can learn more :

Related posts
Power BITutorials

Opportunity Analysis Power BI Dashboard

1 Mins read
Information: A software company that has two sales channels: direct and partner. The sales manager created this dashboard to track opportunities and…
Power BITutorials

Procurement Analysis Power BI Dashboard

1 Mins read
Information: It analyzes a manufacturing company’s spending on vendors by category and location. we explore these areas: Who the top vendors are…
Power BITutorials

Retail Analysis Power BI Dashboard

1 Mins read
Information: It analyzes retail sales data of items sold across multiple stores and districts The metrics compare this year’s performance to last…