Belebala
New member
- Joined
- Jan 28, 2019
- Messages
- 13
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2016
Hello,
I'm new to power query and would like some help on import workbook with dynamic file location.
I have a an excel file with power query saved under W:\Excel\Jan and the source file is saved under W:\Excel\Jan\Source. I copy the same file to another location for the next month (W:\Excel\Feb) from a new source file W:\Excel\Feb\Source.
I don't want to change my source from my queries every month, is there anyway to have a dynamic source location?
I have googled and it suggested to create a parameter table with the value of the source location =LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1) and create a ParameterValue query of = Table.TransformColumnTypes(Source,{{"ParameterValue", type text}}). Now I'm stuck. In my query, I changed my source to the following but it is giving me an error or "The important ParameterQuery matches no exports":
Let
Source = Excel.Workbook(File.Contents(ParameterQuery[ParameterValue]{0})),
I am not a tech savy and have no idea how it should work. Much appreciated if anyone could help.
Thanks.
Belebala
I'm new to power query and would like some help on import workbook with dynamic file location.
I have a an excel file with power query saved under W:\Excel\Jan and the source file is saved under W:\Excel\Jan\Source. I copy the same file to another location for the next month (W:\Excel\Feb) from a new source file W:\Excel\Feb\Source.
I don't want to change my source from my queries every month, is there anyway to have a dynamic source location?
I have googled and it suggested to create a parameter table with the value of the source location =LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1) and create a ParameterValue query of = Table.TransformColumnTypes(Source,{{"ParameterValue", type text}}). Now I'm stuck. In my query, I changed my source to the following but it is giving me an error or "The important ParameterQuery matches no exports":
Let
Source = Excel.Workbook(File.Contents(ParameterQuery[ParameterValue]{0})),
I am not a tech savy and have no idea how it should work. Much appreciated if anyone could help.
Thanks.
Belebala