从相对路径将数据加载到 Power BI [英] load data into power BI from relative path

查看:61
本文介绍了从相对路径将数据加载到 Power BI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到一种解决方案来加载外部数据文件,但从相对路径加载,因此当其他人打开我的 PBIX 时,它仍然可以在他/她的计算机上运行.

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.

非常感谢.

推荐答案

Power BI 目前** 支持相对路径.

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

为了减轻痛苦,您可以创建一个包含文件所在路径的变量,并使用该变量来确定每个表的路径.这样,您只需更改一个位置(该变量),所有表都会自动指向新位置.

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.

创建一个空白查询,为其命名(例如 dataFolderPath)并输入文件所在的路径(例如 C:\Users\augustoproiete\Desktop)

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)

创建变量后,在 Advanced Editor 中编辑每个表,并将变量与文件名连接起来.

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

例如而不是 "C:\Users\augustoproiete\Desktop\data.xlsx",将其更改为 dataFolderPath &"\data.xlsx"

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

您还可以投票/观看此功能请求,以便在实施时收到通知:

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

这篇关于从相对路径将数据加载到 Power BI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆