在将列添加到源表后刷新电源查询?

时间:2020-01-03 14:10:12

标签: excel powerquery m

我有一个带有数据表的excel工作簿(book1)。

在另一本工作簿(book2)中,我有一个使用此数据作为源的超级查询。想法是轻松地在book2中获得book1中表的本地只读副本。

当在源中添加其他列时,我不太清楚如何更新查询。我没有尝试将新列拉入查询。我很困惑,因为查看M代码似乎只是引用book1中的整个表:

let
    Source = Excel.Workbook(File.Contents("M:\!OtherStuff\!Cellar CIP Logs\CIP Lab 2020\CIP Storage.xlsm"), null, true),
    eqm_Table = Source{[Item="eqm",Kind="Table"]}[Data],
    #"Changed Type" = Table.TransformColumnTypes(eqm_Table,{{"Equipment", type text}, {"Category", type text}, {"Group", type text}, {"CIP Types", type text}, {"Data Type", Int64.Type}, {"Sani Duration (hrs)", type text}, {"Interval Duration (hrs)", type text}, {"Linked Status", type text}, {"Class", type text}, {"Status", type text}, {"Last Action", type datetime}, {"Status History", type text}, {"Last Action History", type datetime}, {"Interval Last Action", type datetime}, {"Empty", type any}, {"1 Validation", type text}, {"1 CIP Types", type text}, {"1 Value", type text}, {"2 Validation", type text}, {"2 CIP Types", type text}, {"2 Value", type text}, {"3 Validation", type text}, {"3 CIP Types", type text}, {"3 Value", type text}, {"4 Validation", type text}, {"4 CIP Types", type text}, {"4 Value", type text}, {"5 Validation", type text}, {"5 CIP Types", type text}, {"5 Value", type text}, {"6 Validation", type text}, {"6 CIP Types", type text}, {"6 Value", type text}, {"7 Validation", type text}, {"7 CIP Types", type text}, {"7 Value", type text}})
in
    #"Changed Type"

因此,假设我在源表的“空”列之后添加了“空历史”列。要使book2中的能力查询在刷新新列时需要采取什么步骤?

0 个答案:

没有答案
相关问题