在PowerQuery中复制步骤


1

Excel Power Query中是否存在从先前的查询复制应用步骤以便所有应用的步骤显示在副本中?在中,我想将10步查询复制到步骤6,然后添加新步骤,从先前查询中分叉。

看起来PowerQuery中的“重复”选项将复制整个查询,并且不允许更改任何步骤。

感谢您对此的帮助。

Answers:


1

在Power Query项目中,您希望复制10个步骤中的前6个步骤:

选择选项卡视图和选项高级编辑器

复制那里的所有内容,并将其保存在剪贴板中以便立即使用,或者将其存放在像记事本一样的临时位置。它看起来像这样:

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"

打开新项目,导航到“ 高级编辑器”,然后替换该窗口中的任何内容。

  1. 删除查询的步骤7-10,每个步骤以#“开头
  2. 删除第6个查询步骤结束时出现的逗号[,](如果确实涉及查询步骤6,则可能需要向右滚动才能找到它)
  3. “in”行下面是您的第10个查询步骤; 用相同的格式替换为你的第6个#“[查询步骤描述]”

现在看起来应该是这样的:

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. 验证高级编辑器的底部是否显示“未检测到语法错误”(如果发现错误,请再次尝试)
  2. 单击“完成”

应用步骤”窗口显示您通常使用的所有内容,并且每个步骤都是可编辑的。


很高兴听到!将欣赏答案接受点击:)
Tisconie

完成!对此抱歉,这是我提出的第一个问题。
DrewDaddio
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.