Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a power Query with 7 different files sources feeding into it.
I have organised these into 3 Folders in the same location on my hard Drive saved on One Drive. Recently my one drive stopped syncing and so have to reconnect and now I have to move my folder to the new one drive to ensure it is synced online.
I am very aware that Power Query remembers the exact location of the source files, so moving them will be an issue.
Other than working through each query when it is loaded and changing the file paths individually is there any way to do this quicker. I have one drive on my Laptop and my offfice machine and it would be nice for the query to work in more than one location. Is there any way to set the source lcoation to be releative to the Query file? Otherwise the query files really can't be easily shared.
Thanks
Solved! Go to Solution.
Well, there's allways more than one way to skin a cat:
A very dirty method might be to re-name the parent folder, then go into Power Query and do a Refresh All and see what fails. 🙂
Maybe try some 3rd party tools like DAX Studio or Tabular Editor. This article introduces adding them directly into Power BI Menu and offers some links: https://powerbi.microsoft.com/en-us/blog/announcing-public-preview-of-external-tools-in-power-bi-des...
Best of luck.
Proud to be a Super User! | |
I don't think you can specify a relative path in the File source query. But you can use a Power Query Parameter for the Folder portion.
Suppose all your files are under sub folders under C:\My One Drive with a really long path name that I don't want to keep re-typing\
Create a Parameter of type Text, with that value.
Then in each of the File Sources, substitute the literal path string with the Parameter name and concatenate the file name.
Proud to be a Super User! | |
Thats sound like a good work around because if you change the parameter I assume that would change all the locations it points to.
I found a video for using this and I think I have it working for one table.
Question: if you have say seven files with "C:\My One Drive with a really long path"
Is there a way you can find all these in power query (Like a searching a text string through all the code)
Well, there's allways more than one way to skin a cat:
A very dirty method might be to re-name the parent folder, then go into Power Query and do a Refresh All and see what fails. 🙂
Maybe try some 3rd party tools like DAX Studio or Tabular Editor. This article introduces adding them directly into Power BI Menu and offers some links: https://powerbi.microsoft.com/en-us/blog/announcing-public-preview-of-external-tools-in-power-bi-des...
Best of luck.
Proud to be a Super User! | |