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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

How to reuse PQ transformation steps or create a PQ template?

Hi,
Each day I download a excel-file with data to be analyzed. However, before I can analyze the data I need to make some transformation changes, e.g. delete some columns, divide some, sort by date and so on. I would like to only make these transformations once and save them as a "template" which later can be used in the next excel file. I don't want to combine the files, just reuse the transformation steps. I have tried using Power Query for this, but I am very new to using Power Query so I can't seem to get it to work properly.
How can I get this to work with Power Query or is there any other way to do this?

2 ACCEPTED SOLUTIONS
PwerQueryKees
Super User
Super User

You can create a custom function. But if you are really new, start here: https://learn.microsoft.com/en-us/powerquery-m/understanding-power-query-m-functions

It is not really hard if you have some coding experience.

The UI also gives some support.

If you want a solution, you could post the query here for someone to convert to a function.

I don't have access to my laptop at the moment, so it will have to be someone else...

View solution in original post

Anonymous
Not applicable

You could just open yesterday's workbook with the query that you used, and change the Source to the newest file. Then all of your steps will apply to the new file. 

--Nate

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

You could just open yesterday's workbook with the query that you used, and change the Source to the newest file. Then all of your steps will apply to the new file. 

--Nate

PwerQueryKees
Super User
Super User

You can create a custom function. But if you are really new, start here: https://learn.microsoft.com/en-us/powerquery-m/understanding-power-query-m-functions

It is not really hard if you have some coding experience.

The UI also gives some support.

If you want a solution, you could post the query here for someone to convert to a function.

I don't have access to my laptop at the moment, so it will have to be someone else...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.