Charley
Member
- Joined
- Jul 29, 2017
- Messages
- 64
- Reaction score
- 0
- Points
- 6
- Excel Version(s)
- 365
I have this query, named cMyPath, which returns the file path entered in a named cell:
---------------------
let
Source = Excel.CurrentWorkbook(){[Name="cFilePath"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
Column1 = #"Changed Type"{0}[Column1]
in
Column1
------------------
And I have a query that begins...
-------------------
let
Source = Folder.Files("E:\MyPath"),
-------------------
But when I replace the path text with the first query's name, like this...
-------------------
let
Source = Folder.Files(cMyPath),
--------------------
...I get this error message: Formula.Firewall: Query 'MyText' (step 'Changed Type') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
How can I set this up so that Source can use whatever path has been entered in the cMyPath cell?
Thanks.
---------------------
let
Source = Excel.CurrentWorkbook(){[Name="cFilePath"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
Column1 = #"Changed Type"{0}[Column1]
in
Column1
------------------
And I have a query that begins...
-------------------
let
Source = Folder.Files("E:\MyPath"),
-------------------
But when I replace the path text with the first query's name, like this...
-------------------
let
Source = Folder.Files(cMyPath),
--------------------
...I get this error message: Formula.Firewall: Query 'MyText' (step 'Changed Type') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
How can I set this up so that Source can use whatever path has been entered in the cMyPath cell?
Thanks.