powerbi

load data into power BI from relative path


I am trying to find a solution to load an external data file but from a relative path, so when someone else open my PBIX it will still work on his/her computer.

many thanks.


Solution

  • Relative paths are *not* currently supported by Power BI.

    power bi does not support relative paths


    To ease the pain, you can create a variable that contains the path where the files are located, and use that variable to determine the path of each table. That way, you only have to change a single place (that variable) and all the tables will automatically point to the new location.

    Create a Blank Query, give it a name (e.g. dataFolderPath) and type in the path where your files are (e.g. C:\Users\augustoproiete\Desktop)

    create Blank Query

    type path for the files

    With the variable created, edit each of your tables in the Advanced Editor and concatenate your variable with the name of the file.

    e.g. instead of "C:\Users\augustoproiete\Desktop\data.xlsx", change it to dataFolderPath & "\data.xlsx"

    enter image description here


    You can also vote/watch this feature request to be notified when it gets implemented: