question

JohnGillies-2369 avatar image
0 Votes"
JohnGillies-2369 asked MiguelEscobar-3907 answered

how can I use the same Power Query on different Worksheets in the same workbook

I use Sabermetrics for one of my hobbies. I am doing comparative analysis of the 30 major league teams. I am attempting to build a Power Query (PQ) for one of the 30 teams and then reuse it for the other 29 teams. It is essentially a "cut and paste" procedure. I am deriving my data from https://www.baseball-reference.com/teams/WSN/2021-schedule-scores.shtml , and then creating a PQ based on the Washington Nationals.

I have created the PQ, but I am stymied. I have not figured out how to apply the same PQ to the other 29 teams. I have inserted a screenshot.
129372-image.png

Thanks in advance for reading this and (hopefully) helping me resolve this issue.

power-query-not-supported
image.png (188.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MiguelEscobar-3907 avatar image
0 Votes"
MiguelEscobar-3907 answered

Hey!
What about using the "Combine files" experience assuming that this data comes from a file? if not, you can also try converting that query into a custom function and then reuse it with the rest of the teams.

Below are some links that you might find helpful:
https://docs.microsoft.com/en-us/power-query/combine-files-overview
https://docs.microsoft.com/en-us/power-query/custom-function

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.