我正在根据上次刷新日期从共享文件夹编译报告。我遇到的问题是每张纸仅返回第一行。
我已阅读相关帖子,一种有效的解决方案是进入源表,保存它们,关闭并刷新查询。理想情况下,我不想每次都执行此步骤。知道问题出在哪里吗?
Path = Excel.CurrentWorkbook(){[Name="Month"]}[Content],
Source = Folder.Files(Text.Combine({"Z:\OutputReport\2025\",Path[Month]{0}})),
#"Renamed Columns1" = Table.RenameColumns(Source, {"Name", "Source.Name"}),
#"Invoke Custom Function1" = Table.AddColumn(#"Renamed Columns1", "Transform File", each #"Transform File"([Content])),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Invoke Custom Function1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{Long List of columns}),
#"Extracted Text Between Delimiters" = Table.TransformColumns(#"Changed Type", {{"Source.Name", each Text.BetweenDelimiters(_, "_", "_"), type text}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Extracted Text Between Delimiters",{{"Source.Name", type date}}),
#"Renamed Date" = Table.RenameColumns(#"Changed Type1",{{"Source.Name", "Date"}}),
#"Merged - Logged Date" = Table.CombineColumns(Table.TransformColumnTypes(#"Renamed Date", {{"Date", type text}, {"Logged Date", type text}}, "en-GB"),{"Date", "Logged Date"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Logged Date"),
#"Change Type - Logged DateTime" = Table.TransformColumnTypes(#"Merged - Logged Date",{{"Logged Date", type datetime}}),
#"Removed Other Columns" = Table.SelectColumns("Long List of columns"),
#"Changed Type2" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Logged Date", type date}}),
#"Filtered Last Refreshed" = Table.SelectRows(#"Changed Type2", each [Logged Date] >= Date.AddDays(#"Last Refreshed",-1))in
#"Filtered Last Refreshed"
看起来最后一步过滤了数据。你可以删除最后一步试试。
Path = Excel.CurrentWorkbook(){[Name="Month"]}[Content],
Source = Folder.Files(Text.Combine({"Z:\OutputReport\2025\",Path[Month]{0}})),
#"Renamed Columns1" = Table.RenameColumns(Source, {"Name", "Source.Name"}),
#"Invoke Custom Function1" = Table.AddColumn(#"Renamed Columns1", "Transform File", each #"Transform File"([Content])),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Invoke Custom Function1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{Long List of columns}),
#"Extracted Text Between Delimiters" = Table.TransformColumns(#"Changed Type", {{"Source.Name", each Text.BetweenDelimiters(_, "_", "_"), type text}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Extracted Text Between Delimiters",{{"Source.Name", type date}}),
#"Renamed Date" = Table.RenameColumns(#"Changed Type1",{{"Source.Name", "Date"}}),
#"Merged - Logged Date" = Table.CombineColumns(Table.TransformColumnTypes(#"Renamed Date", {{"Date", type text}, {"Logged Date", type text}}, "en-GB"),{"Date", "Logged Date"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Logged Date"),
#"Change Type - Logged DateTime" = Table.TransformColumnTypes(#"Merged - Logged Date",{{"Logged Date", type datetime}}),
#"Removed Other Columns" = Table.SelectColumns("Long List of columns"),
#"Changed Type2" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Logged Date", type date}})
#"Changed Type2"