Hi. I am really confused by this behavior. I have a query that updates via a folder. I decided today that instead of monthly updates I was going to try weekly. So I removed the files and figured I would run the query again but have a smaller output due to smaller source files. Nope. I got all the files that used to be in the folder. Scratching my head.
I'm sure it is something I did wrong because that is how we learn. But this is annoying since it appears to me to be right. Thanks for looking.
|
Power Query:
let
Source = Folder.Files("D:\FILL RATES\CURRENT WEEK"),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File (3)", each #"Transform File (3)"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File (3)"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File (3)", Table.ColumnNames(#"Transform File (3)"(#"Sample File (3)"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"DATE", type date}, {"NAME", type text}, {"InventoryItemName", type text}, {"TO Issue", Int64.Type}, {"WH OH", Int64.Type}, {"LOCATION", type text}, {"ROUTE", type text}, {"PIXSYS #(lf)ISSUED", Int64.Type}, {"DIFF", Int64.Type}, {"MATCH?", type logical}, {"FILL RATE", Int64.Type}, {"LINE", type number}, {"ACTION TAKEN/NOTES", type any}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Source.Name"})
in
#"Removed Columns"
I'm sure it is something I did wrong because that is how we learn. But this is annoying since it appears to me to be right. Thanks for looking.