Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Power Query Applied steps

In power query editor there is list of applied steps can we apply these steps to a new excel file automatically?

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, here's my solution.

1.In Power BI Power Query, open Advanced Editor and copy the whole code.

vyanjiangmsft_0-1692697227425.png

2.In Excel, launch Power Query Editor.

vyanjiangmsft_1-1692697307103.png

3.Create a blank query through Home>New Source>Other Sources>Blank Query.

vyanjiangmsft_2-1692697350985.png

4.Then in Excel Advanced Editor, paste the M code copied in step1 in it.

vyanjiangmsft_3-1692697433298.png

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, here's my solution.

1.In Power BI Power Query, open Advanced Editor and copy the whole code.

vyanjiangmsft_0-1692697227425.png

2.In Excel, launch Power Query Editor.

vyanjiangmsft_1-1692697307103.png

3.Create a blank query through Home>New Source>Other Sources>Blank Query.

vyanjiangmsft_2-1692697350985.png

4.Then in Excel Advanced Editor, paste the M code copied in step1 in it.

vyanjiangmsft_3-1692697433298.png

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

I Think I missed that I am talking about Power Bi not excel file. My question is In power BI power query editor there is list of applied steps can we apply these steps to a new excel file automatically?

foodd
Super User
Super User

As a general answer, yes.   However, there is much more to the story.   Power Query (known as Get & Transform in Excel ) lets you create a sequence of data transformation steps that can be reused and is a feature of Excel.   

 

The support.microsoft article  About Power Query in Excel and Power Query for Excel Help is helpful.

 

Picking one well-known resource to hand you off to would be Chandoo.   

He is well-known in the community and provides a very gentle introduction within his 

August 2020 blog post:  Power Query Tutorial – What is it, How to use, Full examples, Tips & Tricks.  

 

There are a number of books on the subject, although the best known to be 

 

Collect, Combine, and Transform Data Using Power Query in Excel and Power BI, by Gil Raviv (a second edition will be out soon)

 

Gil Raviv was the Senior Program Manager on the Microsoft Excel Product team, who led the design and integration of Power Query to Excel 2016.

 

There are many other folks and many who actively participate in helping others here on the Community Forum

quite regularly.

 

 

 

Anonymous
Not applicable

Thank you so much for your recomendation but can you please tell me specifically about my problem? how I can apply same steps to other same formated excel file?

Sure. The quick answer.

 

  • Excel Files A and B each contain one worksheet named Sheet1
  • Sheet1 contains a single table named Table1
  • Each workbook needs some sort of pre-process data activity on the data from Table1 that Power Query is able to fulfill through the use of a query that is made up of a series of 
    recorded steps.
  • A query is plain text and can be saved, viewed, and edited outside of Power Query.
  • Copying a query from File A to File B would work in this specific case.

 

General Steps:

 

From File A select the desired query, and copy the query using the following steps :

 

Data Tab > Queries & Connections > Queries & Connections > Queries > right click on Query of Interest and choose Copy from the flyout menu.

 

Then, change to File B, follow the same steps, and in this case, paste the copied query from File A.  It is prudent to edit the query pasted to File B to verify the Source and any transformations are as desired.

 

That is the key reason I answered an open question with a broad answer that would allow for a clearer understanding of Power Query and how to get started with it.

 

foodd_0-1692308686066.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.