i am trying to set up a dynamic source iin power query so i can load the filepath and have it go there.
i've been able to do it by placing the filepath into a workbook and then pulling into PQ as a table, and using the drill down.
Renaming the query as Directory (table is called directory as well)
then going into the Advanced editor of the imported data query changing the "c:filepath name" with the directory (see below)
but when i've tried to do the same steps i cant recreate it
is there something i'm missing?
let
Source = Csv.Document(File.Contents(Directory),[Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.None])
in
Source
i get the message:
Formula.Firewall: Query 'TestFile' (step 'Source') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
i've set the permissions to global
Hi Algemron,
File.Contents needs a file path, not a folder path.
Try starting the query using From Folder option, not from File, then change the folder path with a parameter.
thank you for this
think i've cracked it now with this