Hi Mynda
I have been using your solutions on dynamic relative file and folder path from lesson 7.03 and 7.04.
My question is, whether it is possible to dynamically reference to more than one source folder ?
I tried organizing my source files in "Organisation", "Employees", "Basic data" and "Case files". But I haven't found a solution to dynamically work with af file and folder structure like that.
When my project is done, files will have to be moved in order for others to be able to use my report file.
Erik
Hi Erik,
Are the files from each folder consolidated into a separate table? If so, you could just create a separate dynamic file path for each folder and give them different names.
Hope I've understood the issue, but let me know if not.
Mynda
Hi Mynda
I have one "main" file with a dashboard and 2 sheets with detailed information to specifik departments. This one is placed in the main folder and has got 4 sub-folders.
The information comes from 12 different files placed in the sub-folders as mentioned above - all files except 2 contains just one sheet formatted as a table and named. The information can be filtered using slicers.
The last 2 files contains some static data to show development since january 2019 and up to present day and presented in the dashboard.
Tried your suggestion - and made it work with 4 named filepaths - called them "FilepathOrganisation", "FilepathEmployees".. and so on and used M code like this:
let
Filepath = Excel.CurrentWorkbook(){[Name="FilepathOrgnaisation"]}[Content]{0}[Column1],
Source = Excel.Workbook(File.Contents(Filepath & "Filename.xlsx"), null, true),
With your experience - am I making things too complicated ?
Doing so I can prevent user access to the subfolders and my colleagues can update the files.
Erik
Hi Erik,
Glad you got it working. Just to be clear, if your colleagues don't have access to the folders they won't be able to refresh the queries. If you don't need them to refresh the queries, i.e. you'll do that for them, then this setup should work fine.
Mynda
Thanks a lot - think this will work perfectly.
My colleagues will have access and should be able to refresh the queries.
But the users should not - and they will not have access to the folders.
Erik