Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AnassEss
Helper I
Helper I

DATA LOADING TO THE LOCATION WHERE THE PBIX FILE IS

Hi once again, 

 

So I had the previous issue solved with the roots but now I want the origin of the data to be: whenever the pbix file is, for example, let's suppose I have a directory in my desktop called DIRECTORY and I save my pbix file there with an excel called BBDD and for some reason the name of my file changes to BBDD_1, I want the PBIX file to be able to extract the data even if name is changed(based on: extract data from the location where the pbix is located) or even if I move the pbix and the excel to another directory called DIRECTORY2 for example it should keep extracting the info from the excel as long as the excel is in the same Directory as the PBIX file

 

Thanks in advance and kind regards.

1 ACCEPTED SOLUTION
v-yaningy-msft
Community Support
Community Support

Hi, @AnassEss 

Based on your description, you want to implement the requirement to dynamise the data source, even if the file name of the data source changes or moves. Unfortunately, Power BI does not inherently support relative paths to data sources. Data sources are typically defined using absolute paths or connections that are not automatically updated based on the location of the .pbix file. However, you can use the following methods to fulfil some of your needs.

1. Parameterise the data source paths, using Power Query to create the parameters used to define the paths and file names. This allows you to dynamically change paths and file names without having to edit the query directly. However, this method requires you to manually update the parameters if the file location or name changes.
How to Parameterize Data Sources in Power BI | phData

2. Store files on OneDrive or SharePoint If files are stored on OneDrive or SharePoint, Power BI can automatically refresh the data when files are updated. This does not solve the problem of moving directories, but it does help to change file names if overwriting existing files.
Refresh a semantic model created from a .csv file on OneDrive - Power BI | Microsoft Learn

3. Consider using Power BI Data Flow to import data into the Power BI service. While this doesn't directly address relative paths, it centralises data management in the cloud, making it easier to manage and share data sources without worrying about local file paths.

 

Overall, the current version does not address the issue of moving data source paths. If you move files and change names frequently, I recommend that you keep track of the data source parameters or paths used in your reports and update them during the file management process. You can submit an idea for here and the product team will take note of such a need.

Related Link: New tab (powerbi.com)

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

1 REPLY 1
v-yaningy-msft
Community Support
Community Support

Hi, @AnassEss 

Based on your description, you want to implement the requirement to dynamise the data source, even if the file name of the data source changes or moves. Unfortunately, Power BI does not inherently support relative paths to data sources. Data sources are typically defined using absolute paths or connections that are not automatically updated based on the location of the .pbix file. However, you can use the following methods to fulfil some of your needs.

1. Parameterise the data source paths, using Power Query to create the parameters used to define the paths and file names. This allows you to dynamically change paths and file names without having to edit the query directly. However, this method requires you to manually update the parameters if the file location or name changes.
How to Parameterize Data Sources in Power BI | phData

2. Store files on OneDrive or SharePoint If files are stored on OneDrive or SharePoint, Power BI can automatically refresh the data when files are updated. This does not solve the problem of moving directories, but it does help to change file names if overwriting existing files.
Refresh a semantic model created from a .csv file on OneDrive - Power BI | Microsoft Learn

3. Consider using Power BI Data Flow to import data into the Power BI service. While this doesn't directly address relative paths, it centralises data management in the cloud, making it easier to manage and share data sources without worrying about local file paths.

 

Overall, the current version does not address the issue of moving data source paths. If you move files and change names frequently, I recommend that you keep track of the data source parameters or paths used in your reports and update them during the file management process. You can submit an idea for here and the product team will take note of such a need.

Related Link: New tab (powerbi.com)

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.