Forum Discussion
Dynamic Data Source Modification
Hi manuel_ak ,
Please consider avoiding the use of dynamic variables as the file path for Folder.Files, as it may be treated as a dynamic data source and could cause issues during refresh.
let
Source = Folder.Files("..............\Production\Tip OD- 16F"),
#"Filtered rows" = Table.SelectRows(Source, each ([Extension] = ".csv")),
#"Imported CSVs" = Table.AddColumn(#"Filtered rows", "Custom", each Csv.Document(File.Contents([Folder Path] & [Name]), [Delimiter=",", Columns=10, Encoding=1252, QuoteStyle=QuoteStyle.None])),
#"Removed First 4 Rows" = Table.TransformColumns(#"Imported CSVs", {"Custom", each Table.Skip(_, 4)}),
#"Expanded Content" = Table.ExpandTableColumn(#"Removed First 4 Rows", "Custom", {"Column1", "Name", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10"}),
#"Filtered Name" = Table.SelectRows(#"Expanded Content", each Text.StartsWith([Name], "20")),
#"Combined Tables" = Table.Combine(#"Filtered Name")
in
#"Combined Tables
I think this link will help you a lot:
Best Regards,
Bof