1

Is there anyway in Excel Power Query to duplicate the Applied Steps from a prior query so that all of the applied steps show in the duplicate? As in, I'd like to duplicate a 10 step query to step 6 and then add in new steps from where it forks from the prior query.

It looks like the "Duplicate" option within PowerQuery will duplicate the entire query and not allow any steps to be changed.

Thank you for your help with this.

1

In the Power Query project you would like to copy the first 6 of your 10 steps:

Select tab View and option Advanced Editor

Copy everything there and either keep it in your clipboard for immediate use or store it somewhere temporarily like notepad. It will look something like this:

let
      Source = [Bunches of stuff],
      #"Step 1" = [All the things that happen],
      #"Step 2" = [All the things that happen],
      #"Step 3" = [All the things that happen],
      #"Step 4" = [All the things that happen],
      #"Step 5" = [All the things that happen],
      #"Step 6" = [All the things that happen],
      #"Step 7" = [All the things that happen],
      #"Step 8" = [All the things that happen],
      #"Step 9" = [All the things that happen],
      #"Step 10" = [All the things that happen]
in
      #"Step 10"

Open your new project, navigate to Advanced Editor, and replace whatever is in that window.

  1. Remove steps 7-10 of your query, each begins with #"
  2. Delete the comma [,] that appears at the end of your 6th query step (you may need to scroll right to find it if query step 6 is really involved)
  3. Below the line "in" is your 10th query step; replace it with your 6th in the same format #"[Query step description]"

Now it should look like this:

let
      Source = [Bunches of stuff],
      #"Step 1" = [All the things that happen],
      #"Step 2" = [All the things that happen],
      #"Step 3" = [All the things that happen],
      #"Step 4" = [All the things that happen],
      #"Step 5" = [All the things that happen],
      #"Step 6" = [All the things that happen]
in
      #"Step 6"
  1. Verify the bottom of the Advanced Editor says "No syntax errors have been detected" (try again if errors are found)
  2. Click Done

Your Applied Steps window shows everything you typically work with and each step is editable.

  • Great to hear! Would appreciate an answer accepted click :) – Tisconie May 25 '18 at 23:20
  • Done! Sorry about this, this is the first question that I asked. – DrewDaddio May 25 '18 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.